- 01 Dec, 2017 12 commits
-
-
Alexis Hetu authored
Added some validation for uniforms and uniform blocks. Fixes some failures in (only 1 failure left): dEQP-GLES3.functional.negative_api.state* Change-Id: I507c7e8784230f85b0d312d162e5ff82bdbd15ed Reviewed-on: https://swiftshader-review.googlesource.com/14428Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I03a369139b733a75a7790e65afc514b929e32090 Reviewed-on: https://swiftshader-review.googlesource.com/14468Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Bug chromium:769026 Change-Id: I059117a0209e3ac13877736abafe3599310f0670 Reviewed-on: https://swiftshader-review.googlesource.com/14448Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The addressing is offset by 1 to account for the border. Note that this could be avoided by locking at (0, 0) instead of (-1, -1) instead, but then negative address offsets have to be allowed and this complicates the subsequent calculations and only unsigned extension from 32-bit to 64-bit is typically for free during memory accesses. Change-Id: I5fb843401d440a9d77d141782124a9c260765830 Reviewed-on: https://swiftshader-review.googlesource.com/13289Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The border addressing mode should ideally blend with the border color when using linear filtering. Until we have a border of pixels around 2D textures, we should probably avoid bleeding pixels from the opposite edge and just clamp the coordinates. Change-Id: I7afbb629998732b62413e00ba7bcd55340c7b9bb Reviewed-on: https://swiftshader-review.googlesource.com/14289Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: Ic259645ab7950b0b2800964bbfd14f3294de50b1 Reviewed-on: https://swiftshader-review.googlesource.com/14288Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The cube texture borders will be used for linear interpolation, in order to produce seamless edges. Change-Id: Idd17c72c6aaf7dcc65188b065ac8ba179b58cc37 Reviewed-on: https://swiftshader-review.googlesource.com/8209Tested-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Borders are required to support seamless cubemap sampling. Subsequent patches will fill the borders with pixels from adjacent cube faces. The border is expressed in pixels and is added on all edges, resulting in an image of dimensions (width + 2 * border) x (height + 2 * border). The surface still exposes dimensions of width x height through the API and points to the same pixel when locked. Change-Id: I06d5121267ce1a2c50e628490d8690de71bfeb08 Reviewed-on: https://swiftshader-review.googlesource.com/8208Tested-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Uses 0, -1 offsets instead of 0, 1 to be able to use it as a mask. Optimize calculation of the integer coordinates and fraction by always having xyz1 = xyz0 + 1 (before wrap). Optimize the clamping/wrapping of the integer coordinates. Skip addressing operation of the third component for cube sampling (since already projected to 2D face). Change-Id: If2e7c74aac9ae923a0c1ffc278fcdfec00f216f3 Reviewed-on: https://swiftshader-review.googlesource.com/14269Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I35cd9c9e4510529a324f6bd3dfd91e56b834cbca Reviewed-on: https://swiftshader-review.googlesource.com/14268Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We previously computed the LOD of cube maps using the 3D Euclidean distance between the intersections of the sampling rays of a quad with the cube. This underestimates the gradient at the edges where these rays intersect multiple faces. Instead use the Manhattan distance. This may overestimate the footprint dimensions, but only leads to slight blurring instead of aliasing. Change-Id: I5ddbb39765462b1c55c4143b5806154cbdfe7130 Reviewed-on: https://swiftshader-review.googlesource.com/5173Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Previously the derivatives in y were computed using the difference between the second and fourth pixel in the quad. For consistency with the x derivative, use the first and third pixel instead. Also, some shuffling can be eliminated by having the x derivative in the y component, and the y derivative in the z component. Change-Id: I985dcd3c5e2c47c10caf020cf5cb79587b3b3aab Reviewed-on: https://swiftshader-review.googlesource.com/14168Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 30 Nov, 2017 4 commits
-
-
Nicolas Capens authored
The spec states that "If UseProgram is called with program set to zero, then there is no current program object, and the results of vertex and fragment shader execution are undefined. However, this is not an error." Fixes all failures in: dEQP-GLES3.functional.negative_api.vertex_array.* Change-Id: Ia5fbb22a9447b299665db29fc1f564f6de4f202d Reviewed-on: https://swiftshader-review.googlesource.com/14408Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: Id48bc7a232c50b753da64cb914e75b5d590ae47d Reviewed-on: https://swiftshader-review.googlesource.com/14369Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: Ic1e4256bd73281af3e48d0f81ad16ea92a60ce4f Reviewed-on: https://swiftshader-review.googlesource.com/14368Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The slices of 3D and 2D array textures are not at pitch * height offset apart when the height is odd, due to allocating 2x2 quads for render targets. Explicitly use the slice size instead. Change-Id: Id35f35f21a5b2b199215e2526239bcd459141e2c Reviewed-on: https://swiftshader-review.googlesource.com/14348Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 29 Nov, 2017 1 commit
-
-
Reid Kleckner authored
This avoids unnecessary destructor cleanups in swiftshader code. Posix systems use -fno-exceptions, so this updates the MSVC gn args with the equivalent, /EHs-c-. I noticed this while investigating an unrelated issue. Change-Id: Ic56e7560e7cb7617f8596b3ffda0444122425535 Reviewed-on: https://swiftshader-review.googlesource.com/14308Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Reid Kleckner <rnk@google.com>
-
- 28 Nov, 2017 3 commits
-
-
Alexis Hetu authored
Two minor changes: 1) Structs are allowed to have matrix packing qualifiers 2) Adding an extra matrix packing qualifier shouldn't make a shader fail to compile Change-Id: Icbe0178cb6017854c289db90349a17662e868095 Reviewed-on: https://swiftshader-review.googlesource.com/14228Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
GL_DEPTH_COMPONENT24 was missing. It seems to be in all other functions in this file. Fixes debug assert in OGLES3ColourGrading Change-Id: Ifb8fe8dc9248f5acbd9cac3622c3335525711bda Reviewed-on: https://swiftshader-review.googlesource.com/14248Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
dEQP tests up to 1024 for token length. Fixes dEQP-GLES3.functional.shaders.uniform_block.valid.long_* Change-Id: Iba2a79fc210e58e5681dd15a3cece3f8129d4d32 Reviewed-on: https://swiftshader-review.googlesource.com/14229Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 23 Nov, 2017 1 commit
-
-
Alexis Hetu authored
- Added uniform block binding validation - Disallowed setting int uniforms from unsigned int specific functions and vice versa. - Moved early returns from uniform related functions further down the functions to allow gl errors to be returned - Added active transform feedback checks - Fixed some gl error return codes. Fixes most failures in: dEQP-GLES3.functional.negative_api.shader* Change-Id: Id9f914a09dd89fea61728725f8bd828dc7b3f81b Reviewed-on: https://swiftshader-review.googlesource.com/14128Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 22 Nov, 2017 4 commits
-
-
Alexis Hetu authored
Mistook "access" for "usage". Fixed. Change-Id: I8c61aa9dbc0ebd2a68f4363a1d59f9aae7dbc056 Reviewed-on: https://swiftshader-review.googlesource.com/14129Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Added validity checks for RenderbufferStorageMultisample and BlitFramebuffer, mostly missing checks for using integer types or depth/stencil framebuffers with multisampling, which is not allowed. Fixes all failures in: dEQP-GLES3.functional.negative_api.buffer* Change-Id: Ie1db21a3b9f1ca71ed660a2758d43f24846acdf1 Reviewed-on: https://swiftshader-review.googlesource.com/14048Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Can't generate mipmaps if the format is not color renderable or not filterable. Change-Id: I919a4c29c17a69c25e018dd4682940eecd4df30e Reviewed-on: https://swiftshader-review.googlesource.com/14068Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
- Added imageSize validation checks - Added ETC2/EAC specific validations Change-Id: I8671b08caecb7aaff0b42d6843d31738b54d0f5a Reviewed-on: https://swiftshader-review.googlesource.com/14088Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 17 Nov, 2017 4 commits
-
-
Alexis Hetu authored
2 fixes: - The offset check was removed, as it only affects the pointer and not the size - The modulo check is on the type only and not the entire image size Change-Id: I8c4b64e845b2fae61959d7c62d2c5dc222249c68 Reviewed-on: https://swiftshader-review.googlesource.com/14009Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Change-Id: Ibd7a099fa0a25dbddb1733b81101abc82ddd3f4c Reviewed-on: https://swiftshader-review.googlesource.com/14008Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
- Depth output should write to the 1st (Red) channel only - Depth image load should be clamped in the [0, 1] range Change-Id: Ic7c3ac09c86d5457ec3c59bf9666e2b168226c5e Reviewed-on: https://swiftshader-review.googlesource.com/13988Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Added proper validation to make sure the pixel unpack buffer is both unmapped and large enough, when imageSize is specified. Change-Id: If6ec764d741bb9d63d38d0656188846c5a9be66d Reviewed-on: https://swiftshader-review.googlesource.com/13868Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 16 Nov, 2017 9 commits
-
-
Nicolas Capens authored
This optimizes evaluation of chained indexing operations by first looking for an lvalue 'root' node and copying from it directly into the topmost rvalue, instead of creating potentially many temporaries. Change-Id: I47cf9b0230bd305695e7b2a44ddc44bc1320b764 Reviewed-on: https://swiftshader-review.googlesource.com/13908Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I25251e94680624c8c85698e96a053f518bb2c367 Reviewed-on: https://swiftshader-review.googlesource.com/13968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
After traversing the lvalue node tree we're fully done computing the relative address and emitting any pointer arithmetic that might have been needed. So the temporary that would have been used for that is no longer needed. Change-Id: I0a10bff979128f03544d0f8aa860c29f8867973a Reviewed-on: https://swiftshader-review.googlesource.com/13948Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This will enable reusing it to determine the root node of rvalues as well. The only functional change is that struct indexing no longer overrides the register type. This is of no effect here since lvalue intermediates already inherited their type from the root node, but for rvalues the intermediates are considered temporary registers, while instead the root's type should be used. Change-Id: I2dbd1b0f8886c3f111a2ed3ef7fe4e9a5b480085 Reviewed-on: https://swiftshader-review.googlesource.com/13930Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Previously we processed assignments in PostVisit, i.e. after both the left and right side had been traversed. This produces temporaries for the left hand side, which we don't use since we want to assign to the lvalue. So instead we can explicitly traverse the right hand side, and for the left hand side only traverse indirect indexing expressions. Change-Id: I9ec0596a9c256921b65a9f70428d950959f66aa0 Reviewed-on: https://swiftshader-review.googlesource.com/13630Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
GLSL ES 3.0 interface blocks always have uniform storage qualification and thus can't be used as l-value. Change-Id: Iffe948dccbf2edb28eb1abe52a6f28dc76a1e84b Reviewed-on: https://swiftshader-review.googlesource.com/13929Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
This matches Shader Model 4+ assembly syntax and helps debug shader compilation issues. Change-Id: Iff2a2991794e13476b99e11d6ac07fdf5d37570b Reviewed-on: https://swiftshader-review.googlesource.com/13928Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The integer modifier was used to emulate integer arithmetic using floating-point operations, as was allowed/typical for OpenGL ES 2.0 implementations. Now that we support native 32-bit integer types and we have separate opcodes for integer operations, it is not longer needed. Change-Id: I89987534c150d2426ac9f9e1e49b66f9deaee560 Reviewed-on: https://swiftshader-review.googlesource.com/13889Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Matrix elements cannot be accessed with dot notation. Change-Id: I48258428e3fa5ffe9c95a8983516433b98ce233a Reviewed-on: https://swiftshader-review.googlesource.com/13629Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 15 Nov, 2017 2 commits
-
-
Alexis Hetu authored
glDeleteSync can only delete an existing FenceSync object. Change-Id: Ieb78894175235cc97c67ff0324d59bb5d7619918 Reviewed-on: https://swiftshader-review.googlesource.com/13829Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
GL_INVALID_OPERATION is generated if a non-zero vertex array object is bound, zero is bound to the GL_ARRAY_BUFFER buffer object binding point and the pointer argument is not NULL. Change-Id: I48e73dca96bac2bd0496c202785e46e7d754dc11 Reviewed-on: https://swiftshader-review.googlesource.com/13830Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-