- 06 Dec, 2017 5 commits
-
-
Nicolas Capens authored
Change-Id: I3a239325ed802e9188839c1c743d45930643c273 Reviewed-on: https://swiftshader-review.googlesource.com/14608Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Renderbuffer objects are defined to have an initial internalformat of GL_RGBA4, but the red/green/blue/alpha bits are 0. This inconsistency is resolved by setting the internalformat to GL_NONE but reporting GL_RGBA4 when queried. Change-Id: Ie9a342c05eaa23f81773b37ebb942ca2e5b1addb Reviewed-on: https://swiftshader-review.googlesource.com/14588Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
GL_BACK, GL_DEPTH, and GL_STENCIL are only valid for the default framebuffer, while GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT, GL_DEPTH_STENCIL_ATTACHMENT, and GL_COLOR_ATTACHMENTi are only valid for non-default framebuffer objects. Also implement the color encoding query. Change-Id: I153ae9407850a30ed14d9ae145ee3504ba71029a Reviewed-on: https://swiftshader-review.googlesource.com/14569Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
- Attribute location aliasing was allowed prior to shader version 300, so location aliasing is now possible. - Attribute binding refers to the linked location of attributes, so locations set using glBindAttribLocation() will only be returned by glGetAttribLocation() after the program is linked. Before that, it will return the location allocated during the previous glLinkProgram() call. In order to do that, an extra map was added. "linkedAttributeLocation" represents the attributes' location, as a result of linking a program. "attributeBinding" represents the attributes' future location, when the next program linking occurs. On top of that, the shader's version was not being passed down from TranslatorASM to es2::Shader, or from es2::Shader to Program, so this information also needed to be properly transferred. Fixes all failures in: dEQP-GLES3.functional.attribute_location* Change-Id: I4ba7dc7c2f6d444e805cadeb5445f5ff371c3d95 Reviewed-on: https://swiftshader-review.googlesource.com/14568Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Textures and renderbuffers were storing both the OpenGL internalformat and the SwiftShader implementation format (i.e. sw::Format). This change removes the implementation format, only keeping it in the Image class. Change-Id: Ie6ac96f6450b9a55ea9b49c6cf4b2c0681e95522 Reviewed-on: https://swiftshader-review.googlesource.com/14528Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 05 Dec, 2017 2 commits
-
-
Nicolas Capens authored
Change-Id: Ib153f6af75c982fae0325a104da3c0a4fc9ee9dc Reviewed-on: https://swiftshader-review.googlesource.com/14548Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
- Use internalformat parameter if valid, instead of deriving from format/type parameters. - Validate format/type/internalformat parameters in CopyTexSubImage(). - Moved early-out optimizations after validation. - Removed duplicate validation. - Use GLint consistently for internalformat parameters. Change-Id: I377c6bb5381602d13d281f19985aa4f11d201099 Reviewed-on: https://swiftshader-review.googlesource.com/14488Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 04 Dec, 2017 2 commits
-
-
Alexis Hetu authored
- Added *ALPHA8*/*LUMINANCE8* formats and *_SNORM formats to non color renderable formats - Added a new function IsMipMappable in order to allow mipmapping of the *ALPHA8*/*LUMINANCE8* formats Fixes all (24) failures in: dEQP-GLES3.functional.texture.mipmap.2d.generate* dEQP-GLES3.functional.texture.mipmap.cube.generate* Also fixes WebGL test: conformance/textures/misc/texture-npot.html Change-Id: I5f3210094fbc5b2e5bae25c88a5ef4f1ffb69cbd Reviewed-on: https://swiftshader-review.googlesource.com/14130Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Because of the 3 reserved uniforms used for gl_DepthRange, the number of uniforms allowed in fragment and vertex shaders was too small by 3, so their allowed number was increased by 3. As for attributes and varyings, their numbers needed to be increased in order to pass all OpenGL ES 3.0 dEQP tests. Change-Id: I6527334e1503c08281303915654087cbac8089a0 Reviewed-on: https://swiftshader-review.googlesource.com/4034Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Dec, 2017 14 commits
-
-
Nicolas Capens authored
Change-Id: I29e493f91df9ebef948b02096421102eb328d545 Reviewed-on: https://swiftshader-review.googlesource.com/14490Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Drawing without a current program is not an error and we can early-out, but not until after other validation which could generate an error has completed. Validation happening on a valid program happens afterwards though. Likewise, providing insufficient vertices for even one primitive results in drawing nothing, but validation still needs to happen. Change-Id: I5385ffe352fc38343caa41eb99f5549472da3b4f Reviewed-on: https://swiftshader-review.googlesource.com/14489Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
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>
-