- 05 Feb, 2018 7 commits
-
-
Nicolas Capens authored
Change-Id: Iddd32408b090f00cbae15a76cab064d699f5098b Reviewed-on: https://swiftshader-review.googlesource.com/16968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Also remove default constructors and unused members. Bug chromium:801648 Change-Id: I822ca1e1569708ca661796ee9252bae68a0a284a Reviewed-on: https://swiftshader-review.googlesource.com/16948Tested-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 refactoring makes the code for texture image upload significantly smaller. It also aligns better with the layout of table 3.2 in the OpenGL ES 3.0 specification which lists valid format/type combinations. Custom RGB565 format handling was removed because it corresponds with a regular 2-byte per pixel memcpy. Sized internal formats were removed because a recent change fixed not using the internalformat parameter as upload format. Change-Id: Ief6c6e60c3d9a734cac241022bc95ffc88d752c8 Reviewed-on: https://swiftshader-review.googlesource.com/16568Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We were using the internal format to compute the size of the pixels provided for texture image upload. They can differ in size from the format/type combination. Change-Id: I7f3cd535cdefefc3c7ec4695d35d181b43ae20a4 Reviewed-on: https://swiftshader-review.googlesource.com/16629Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Deduplicate common functions and remove unsized color buffer formats. Change-Id: I76b3b507c27c8bfa932aab64a9338e2a124a25da Reviewed-on: https://swiftshader-review.googlesource.com/16289Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We were generating GL_INVALID_OPERATION when a non-compressed format is used where a compressed one is expected or a compressed one is used where a non-compressed one is expected. Instead we can generate GL_INVALID_ENUM since these enums are never valid for these calls (GL_INVALID_OPERATION is for when the enum is valid in some situations but it's currently used incorrectly). Change-Id: I9ee92a92cda0574284e709a5a745d5bb8b825a31 Reviewed-on: https://swiftshader-review.googlesource.com/16888Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The previous fix wasn't handling the case where the same fragment output variable would go through declareFragmentOutput() multiple times, so this cl fixes it. Fixes all dEQP-GLES3.functional.shaders.random failures. Still fixes original WebGL2 conformance tests failures in: all/deqp/functional/gles3/fragmentoutput Change-Id: Ia9c4f5ed5c444ab0c020cac8be511fcaad23c55d Reviewed-on: https://swiftshader-review.googlesource.com/16928Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Feb, 2018 9 commits
-
-
Alexis Hetu authored
Unsigned integers in GLSL were being parsed using the regular integer parser, so it was limited to INT_MAX. All values from INT_MAX + 1 to UINT_MAX could not be parsed properly. Also, added constant folding for the 4 bit conversion glsl functions. Fixes shader compilation issue in the Epic Zen Garden example: https://s3.amazonaws.com/mozilla-games/ZenGarden/EpicZenGarden.html (unfortunately, the screen is still black, so there are other issues left) Fixes WebGL 2 test: conformance2/glsl3/float-parsing.html Change-Id: Iae52b2c8e083f0e1a22599e5a583297b9850444d Reviewed-on: https://swiftshader-review.googlesource.com/16648Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: Ifd2c846c274840f19c1ea8c75fda42bf5640caa4 Reviewed-on: https://swiftshader-review.googlesource.com/16808Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
SwiftShader wasn't correctly handling having no restart indices in the index buffer while having primitive restart enabled. In the WebGL 2 conformance tests, the reference image is also computed while primitive restart is on, which means that Context::drawElements() may modify the internal primitive type, so indices must be adjusted to reflect that change, even if no restart indices are present in the index buffer. Fixes all WebGL 2 tests in: all/deqp/functional/gles3/primitiverestart Change-Id: I24f129e0f7bd42b5037b74617b48a32621440ddb Reviewed-on: https://swiftshader-review.googlesource.com/16548Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB was getting queried by Chromium since GL_ARB_texture_rectangle is exposed, and if this query fails, WebGL does not get enabled. Change-Id: Ie6b40f35f0cfc4547079e303609afa3778010dd1 Reviewed-on: https://swiftshader-review.googlesource.com/16849Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Change-Id: I19de1f5e4e8a690afed2ac7fb2050659a90fa670 Reviewed-on: https://swiftshader-review.googlesource.com/16848Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
GLSL supports constructing vectors from matrices. In the case of vec3(mat2), vec4(mat2) or vec4(mat3), a second instruction is required to copy the remaining matrix elements from the 2nd row of the matrix into the rest of the vector. Fixes 6 webgl conformance tests: conformance/glsl/constructors/glsl-construct-vec3.html conformance/glsl/constructors/glsl-construct-vec4.html conformance/glsl/constructors/glsl-construct-ivec3.html conformance/glsl/constructors/glsl-construct-ivec4.html conformance/glsl/constructors/glsl-construct-bvec3.html conformance/glsl/constructors/glsl-construct-bvec4.html Change-Id: I85ffd3b60623d0dce2bd7c0027748e1829a27dbc Reviewed-on: https://swiftshader-review.googlesource.com/16469Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Row major matrix packing wasn't properly detected when the layout qualifier was on the block member rather than on the block itself or when a nested structure had a matrix packing qualifier. Fixes all failing tests in: deqp/functional/gles3/uniformbuffers* No regressions in: dEQP-GLES3.functional.ubo* Change-Id: I1549a70c4286a8a84b695bc876d71d9cf636b306 Reviewed-on: https://swiftshader-review.googlesource.com/16588Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
This adds support for GL_ARB_texture_rectangle, as it is used in Chromium. This is required in order to use EGL/GLES on MacOS using IOSurface, in order to be able to run Chromium on top of SwiftShader on MacOS. Change-Id: I3c0b6a137892583bbfbc68149874d5bec3026b4a Reviewed-on: https://swiftshader-review.googlesource.com/16368Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Fragment output layout qualifiers may contain location, which was currently ignored by SwiftShader. Pre-declared fragment outputs that have a valid location at the correct location within the fragmentOutputs array to solve this. Fixes all failures in WebGL 2 tests: all/deqp/functional/gles3/fragmentoutput/* Change-Id: I30e004449fb90713984b3481abb24c5d0cd6e867 Reviewed-on: https://swiftshader-review.googlesource.com/16788Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 31 Jan, 2018 1 commit
-
-
Alexis Hetu authored
Updated Flex version from 2.6.0 to 2.6.4 and regenerated files. Change-Id: I7bae30e1f0e1dc16de2bc27f908a1114449d756c Reviewed-on: https://swiftshader-review.googlesource.com/16768Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 26 Jan, 2018 5 commits
-
-
Nicolas Capens authored
VertexProgram and PixelProgram always have a shader. Bug chromium:805881 Change-Id: I0a27b4e7a0bc0ae591d89eb295e215bd421416fb Reviewed-on: https://swiftshader-review.googlesource.com/16749Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug chromium:805881 Change-Id: I2729fd81dbf2ac40bcfb5a0781cf57daefc4f75a Reviewed-on: https://swiftshader-review.googlesource.com/16748Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
The types can differ for many opcodes where the right-hand side is a constant, and this assert isn't that useful, so just remove the opcode checks. Bug chromium:805881 Change-Id: Ibcbda5123aaeaaf5753732d7cad4b5a3b331e963 Reviewed-on: https://swiftshader-review.googlesource.com/16730Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug chromium:805881 Change-Id: I4b63d6415e87f32cc1402649486b2e4d821db546 Reviewed-on: https://swiftshader-review.googlesource.com/16729Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Also replace some extension enums with core ones. Bug chromium:805881 Change-Id: I80a9b658fb8dda9c759c4d79b89fbe71b8b91ae1 Reviewed-on: https://swiftshader-review.googlesource.com/16728Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 25 Jan, 2018 2 commits
-
-
Peter Collingbourne authored
This fixes a build issue when building with libc++ on Windows. Bug: chromium:801780 Change-Id: I8fa84cefa272c2f3b096b2aada793192a47cc0e3 Reviewed-on: https://swiftshader-review.googlesource.com/16468Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Peter Collingbourne <pcc@google.com>
-
Peter Collingbourne authored
libc++ uses a predefined macro to control whether to use exceptions, so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also breaks libc++ because it depends on MSVC headers that only provide certain declarations if _HAS_EXCEPTIONS is 1. Bug: chromium:801780 Change-Id: I0d0c04e55e1e91c3ce7fe90d15b55de0cd7a21ac Reviewed-on: https://swiftshader-review.googlesource.com/16688Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Peter Collingbourne <pcc@google.com>
-
- 24 Jan, 2018 1 commit
-
-
Alexis Hetu authored
We previously had UNIFORM_BUFFER_OFFSET_ALIGNMENT set to 1. That value was arbitrary, and WebGL expects that value to be 4, so I made the change. Fixes WebGL 2 test: deqp/functional/gles3/negativebufferapi.html Change-Id: I7ab654cce629ac2a5dffc9a9d3bff3c1fb1ec8c7 Reviewed-on: https://swiftshader-review.googlesource.com/16608Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 18 Jan, 2018 2 commits
-
-
Sergey Ulanov authored
With this change SwiftShader is buildable for Fuchsia. Integration with Mozard for EGL will be implemented in a separate CL. Bug: chromium:800951 Change-Id: I60160c91aecaa6cdc6b07de688ff54b686613ab3 Reviewed-on: https://swiftshader-review.googlesource.com/16148Tested-by:
Sergey Ulanov <sergeyu@chromium.org> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We were using the effective sized internal format as the upload format of glTexImage*() calls. This caused issues when using e.g. GL_RGBA16F with GL_RGBA / GL_FLOAT. Change-Id: I2dbd7142447c5330eec1895b1a9652ac20f8414a Reviewed-on: https://swiftshader-review.googlesource.com/16448Tested-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 17 Jan, 2018 2 commits
-
-
Nicolas Capens authored
With OpenGL ES 3.0 now fully supported, this will help discern between older and newer builds. Change-Id: I2506d09cf8c9bc59e3c60918ce3d758b0f20586a Reviewed-on: https://swiftshader-review.googlesource.com/16409Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Linux builds can assume to use X11, except if it's Android. Change-Id: I1dc11b5fea73f198ea63d39ca924e95c1d150336 Reviewed-on: https://swiftshader-review.googlesource.com/16408Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 16 Jan, 2018 3 commits
-
-
Alexis Hetu authored
Stencil formats were prohibited from createDepthStencilSurface in debug builds due to an assert, so fixed the assert. Change-Id: I5777a081371be4f43810de4450b415c55f04a8d7 Reviewed-on: https://swiftshader-review.googlesource.com/16348Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
dEQP requires a stack depth of at least 33 for all tests to pass. Since the stack depth in swiftshader is arbitrary and doesn't actually depend on hardware, the maximum stack depth was increased from 16 to 64. Also added a bit of log info to make debugging easier. Fixes 2 dEQP tests: dEQP-GLES3.performance.compiler.optimization.function_inlining.32_nested_* Change-Id: I95ae335977d4eb3b21a54296b7fc5e6019595e66 Reviewed-on: https://swiftshader-review.googlesource.com/16328Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
glGetFragDataLocation() should only query fragment output varyings. Also fix checking for too many varyings. Change-Id: I0981fb69a28762b6d41a22e0544d63c76510000c Reviewed-on: https://swiftshader-review.googlesource.com/16209Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 15 Jan, 2018 1 commit
-
-
Alexis Hetu authored
Chrome tests apparently require these now, so implement these to avoid Linux (debug) related crashes. Change-Id: I603e69eeee166affaf6d456039d75b71d33c3914 Reviewed-on: https://swiftshader-review.googlesource.com/16329Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 12 Jan, 2018 2 commits
-
-
Alexis Hetu authored
Added mix implementation with a bvec as a 3rd argument, which is basically a select. Fixes 18 failures in dEQP-GLES3. Change-Id: Ifaf4a27e1a25fbaad979a7d26ad4a424631acd08 Reviewed-on: https://swiftshader-review.googlesource.com/16288Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Exposing "GL_APPLE_texture_format_BGRA8888" fully enables BGRA8 in Chromium and it seems like SwiftShader isn't properly supporting it yet, so removing the string for now in order to do the DEPS roll. Change-Id: I72f57899b820c22ac76a59b0b7a5e3d2a920e2b3 Reviewed-on: https://swiftshader-review.googlesource.com/16268Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 11 Jan, 2018 3 commits
-
-
Nicolas Capens authored
We are now passing all of dEQP-GLES3 mustpass tests. Change-Id: I98a4e57c4cf90a3b193e220e75a97b9657c746e7 Reviewed-on: https://swiftshader-review.googlesource.com/16208Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Varyings and in/out variables that are passed between shader pipeline stages are verified to have matching types at link-time, even when only statically referenced (this includes trivially optimized out branches) or even just declared. GLSL ES 3.00 - 4.3.10 Linking of Vertex Outputs and Fragment Inputs Change-Id: I122b1cdcc4630c86a8ebfb4d4e37f3a7a335afbe Reviewed-on: https://swiftshader-review.googlesource.com/16070Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
exp2(x) should be exact for integer values of x. For example exp(1.0) should produce 2.0. Change-Id: I9d6d1d388c23e813e09b7b5788c929ff07189357 Reviewed-on: https://swiftshader-review.googlesource.com/16188Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 10 Jan, 2018 2 commits
-
-
Alexis Hetu authored
BGRA8 was missing from the list of valid internal formats Change-Id: Id5c08267e04cefaf621edecb963d65a45d40e041 Reviewed-on: https://swiftshader-review.googlesource.com/16128Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
GL_APPLE_texture_format_BGRA8888 is similar to GL_EXT_texture_format_BGRA8888 but explicitly mentions texture storage support for OpenGL ES 3.0. It adds the format as texture-only (i.e. non-renderable), but GL_EXT_texture_format_BGRA8888 makes it color- renderable. Also allow a sized internalformat of GL_BGRA8_EXT. Previously we were only allowing unsized internalformat GL_BGRA. Change-Id: Ieb3a4f85847035392445d0a924591f5531e424d9 Reviewed-on: https://swiftshader-review.googlesource.com/16069Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-