- 11 Jan, 2018 1 commit
-
-
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 8 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>
-
Alexis Hetu authored
BGRA support was removed in recent refactoring, since no dEQP must pass test required it, but Chrome still requires it. Change-Id: I638adce7dfeeaf85bb1f6d9889103fb4fde26d96 Reviewed-on: https://swiftshader-review.googlesource.com/16068Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We were previously already detecting when a variable name was redefined as a function, but not the inverse. The fix involves inserting the unmangled function name into the symbol table. Change-Id: I0efd1309d45f004c8d1c5ceb864e08c2ebe22f1d Reviewed-on: https://swiftshader-review.googlesource.com/16048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Bug swiftshader:94 Change-Id: I4214270b4ee0dad3f13a8e1556ce0c6366bb045b Reviewed-on: https://swiftshader-review.googlesource.com/16029Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I1b3a4bb977ea5d311be6af9b6b8f04235b002dbe Reviewed-on: https://swiftshader-review.googlesource.com/16028Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Multisampled lines should be rasterized as rectangles, even when we don't support wide lines (i.e. they are one pixel wide). Change-Id: I4960ea7347f826b3af1ff6830ebde46d3065aea9 Reviewed-on: https://swiftshader-review.googlesource.com/16008Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Recently added depth formats were not recognized and caused an assert. Change-Id: Ide1c783f183770d40673051ccd48b3f8e689f8db Reviewed-on: https://swiftshader-review.googlesource.com/15969Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 09 Jan, 2018 7 commits
-
-
Alexis Hetu authored
Removed a conversion to integer which was removing all subpixel precision from coordinates when using clampToEdge. Passes all out of bounds cases (this cl should only affect these cases). Fixes: dEQP-GLES3.functional.fbo.blit.default_framebuffer.srgb8_alpha8_linear_out_of_bounds_blit_from_default Change-Id: Id7cef212ea2b739ef22148779dbc1228628e4440 Reviewed-on: https://swiftshader-review.googlesource.com/15988Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Fixed sRGB filtering by performing the conversion pre-filtering when appropriate. Change-Id: Id24898feed7e9a7dadff45431198771af25efed7 Reviewed-on: https://swiftshader-review.googlesource.com/15409Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Uniforms and varyings structures were simply validating that both versions in fragment and vertex shaders were structures, without validating that the fields actually matched. All the structures and data required to perform the validation at link time was added. Fixes: dEQP-GLES3.functional.shaders.linkage.uniform.struct.type_conflict_1 Change-Id: Icbf888bbebf4ccf7d27f48cb98d4cd7ea5b42ca3 Reviewed-on: https://swiftshader-review.googlesource.com/15848Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The break 'depth' was used to indicate the number of if/else execution enable mask's stack levels we need to discard when jumping from a break statement to its enclosing switch or loop. However, each switch and loop resets this depth at the end, which isn't correct for nested loops and/or switches (note that switches contain if/else statements, and loops use the same 'enable' masks as if/else). This can be fixed either by using a stack to keep track of the break depths of nested switch/loop statements, or by simply not jumping directly from the break statement to the end of it's enclosing switch or loop. The latter fix was chosen for this change, which assumes that that it's uncommon for all vector lanes to become disabled at the break statement and skip many instructions. An important exception to this is breaking out of an infinite or long-running loop, but this is handled by checking the break enable mask as part of the loop condition. Change-Id: I57d2e03941e855faefd997442931ff8619eca73f Reviewed-on: https://swiftshader-review.googlesource.com/15968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Switch statements and loops should not reset the execution enable mask to all lanes at the end, because they can be nested. Instead we can just restore them to the mask value before the switch/loop. Change-Id: I4089cbf637c28f39a536de1e68e2e513ead1ec7f Reviewed-on: https://swiftshader-review.googlesource.com/15908Tested-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 'enable' execution mask for if/else, which is also used by loops, was not being applied to predicate the instructions within a loop. Bug b/28710510 Change-Id: Ibd8e962ef60de76ec1c018ca064a791abf214c94 Reviewed-on: https://swiftshader-review.googlesource.com/15948Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Switch statements were resetting the 'enable' execution mask stack to all lanes, which caused us to execute the switch operations even for lanes that were already done looping. Change-Id: Ie5a525e8de8d5e61d4c61bcee81bd81fa862d917 Reviewed-on: https://swiftshader-review.googlesource.com/15828Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 05 Jan, 2018 4 commits
-
-
Alexis Hetu authored
This cl adds validation that uniform block instance names aren't reserved names. Fixes 2 tests: dEQP-GLES3.functional.shaders.uniform_block.invalid.invalid_identifier_instance_name_* Change-Id: I4a39c734cdf4d11ea4221c73c1f639fa2f56921d Reviewed-on: https://swiftshader-review.googlesource.com/15868Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Removed early return on source rectangle validation, in order to allow out of bounds coordinates as an input to the blitter. Fixes 31 *out_of_bounds* failures in: dEQP-GLES3.functional.fbo.blit.default_framebuffer Also fixes 3 scissored blit failures in: dEQP-GLES3.functional.fragment_ops.scissor Change-Id: I0751678153aa0fc58bb7aa3a0270c358efb61330 Reviewed-on: https://swiftshader-review.googlesource.com/15388Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Many error messages related to uniform block validation were missing, so there was no output message when linking failed. Also, the rowMajor validation was missing and was also not set properly when individual block members were overriding this layout qualifier. Fixes: dEQP-GLES3.functional.shaders.linkage.uniform.block.layout_qualifier_mismatch_5 Change-Id: I97309c3ead6e541d6cd9054ecfd29d08206de7da Reviewed-on: https://swiftshader-review.googlesource.com/15808Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Made sure varyings had the same interpolation qualifier in fragment shader and vertex shader (either both flat or both smooth ). Fixes: dEQP-GLES3.functional.shaders.linkage.varying.rules.interpolation_mismatch_1 Change-Id: I7f68490dc19a3365e492b666acda6f5db91d10ab Reviewed-on: https://swiftshader-review.googlesource.com/15768Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 04 Jan, 2018 2 commits
-
-
Alexis Hetu authored
Because samplers can be stored within structures, register allocation of entire structures within the samplers registers was pushing sampler indices outside of the allowed limit. In order to solve this, sampler registers now exclusively contain samplers, and utility functions to compute sampler only type size were added to make this possible. Bug chromium:797264 Change-Id: Ic5a6f09665c39661944444cd736547bce4dff2ab Reviewed-on: https://swiftshader-review.googlesource.com/15728Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Krzysztof Kosiński authored
This also improves GetProcAddress performance by using binary search instead of linear search. Fixes bug b/20110899 Change-Id: I6c58e17f0580904338e4d806e310cccbec398f28 Reviewed-on: https://swiftshader-review.googlesource.com/15748Tested-by:
Krzysztof Kosiński <krzysio@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 03 Jan, 2018 10 commits
-
-
Nicolas Capens authored
Change-Id: I25567211a4603713ad89a1eb58aa3306b11be0ab Reviewed-on: https://swiftshader-review.googlesource.com/15689Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
-march=core2 implies support for both the SSE3 and SSSE3 instruction set extensions. Chrome should run on CPUs with only SSE2 as well. Also, make use of SSE on x86-32 for floating-point operations, to be consistent with x86-64, and don't favor any specific architecture for tuning. Bug chromium:797763 Change-Id: Ia17428734460ed855f3aa0f83c6d2f6b3775094c Reviewed-on: https://swiftshader-review.googlesource.com/15688Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
OpenGL ES 3.0 specifies that "For fixed-point depth buffers, the final fragment depth written by a fragment shader is first clamped to [0, 1] and then converted to fixed-point as if it were a window z value (see section 2.13.1). For floating-point depth buffers, conversion is not performed but clamping is." Change-Id: Ic7f22f7e47106aaa86c4916fbbbe23ad9c52e186 Reviewed-on: https://swiftshader-review.googlesource.com/15628Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
When the pixel shader writes the depth value, we can't use the interpolated implicit depth to perform a depth buffer test before the pixel shader executes. Change-Id: Icf80de50f4aa79f73b43e341c18478e7fd928b8d Reviewed-on: https://swiftshader-review.googlesource.com/15608Tested-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 LOD value was not being computed for 3D texture sampling when no mipmapping is done. We still need the LOD in case the minification and magnification filters differ. Change-Id: If32d7aaf8a92ace33bcc6ca6f0b60fe33c7e771b Reviewed-on: https://swiftshader-review.googlesource.com/15588Tested-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 array folding logic generated an error when a constant array didn't have an array of literal constants. Change-Id: I48f58936cfa7e19e0f4026fb940654f20d9a9d5e Reviewed-on: https://swiftshader-review.googlesource.com/15551Tested-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.00 spec says that length is only allowed on "array names", but according to https://bugs.chromium.org/p/angleproject/issues/detail?id=2142 that was not intended to be interpreted strictly and it has been clarified in GLSL ES 3.20. Change-Id: Id8944346908e1c122230fd2f94c9a26cf389498b Reviewed-on: https://swiftshader-review.googlesource.com/15550Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Arrays of constants can be dynamically indexed, so they can't be propagated by value and handled as literals like other constants. Instead we store them in the constant register file. Change-Id: Idcee033d694b20d047c70e2d13974e5a6dce127b Reviewed-on: https://swiftshader-review.googlesource.com/15488Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
We were using a quad-layout depth format as the destination format for glReadPixels calls with GL_DEPTH_COMPONENT / GL_FLOAT format. Upload to a texture was also affected. Bug b/64542192 Change-Id: I8ad700bf86737debe3268ec6a3dbd237cd85ea1a Reviewed-on: https://swiftshader-review.googlesource.com/15548Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hétu authored
This reverts commit a141a075. Reason for revert: We need a different solution to fix this issue which doesn't require having a different sampler index and register index. Change-Id: If08a0fc4713e2bd8277630ca760bb8686a2effd2 Reviewed-on: https://swiftshader-review.googlesource.com/15649Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 22 Dec, 2017 1 commit
-
-
Lingfeng Yang authored
On low-resolution Android Emulator AVDs run with -gpu swiftshader_indirect, it's possible to run fast enough to see count == -1 on Resource acquisition. Check for that. bug: 70950184 Test: API 27 Chrome is usable on a 480x800 or smaller device Change-Id: I4f4cf9cd0ab1bc2bce846f0af6ffbbe243bc1a96 Reviewed-on: https://swiftshader-review.googlesource.com/15508Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Lingfeng Yang <lfy@google.com>
-
- 21 Dec, 2017 3 commits
-
-
Nicolas Capens authored
Unlike OpenGL ES 2.0, 3.0 allows framebuffer attachments to be of different sizes: "If the attachment sizes are not all identical, the results of rendering are defined only within the largest area that can fit in all of the attachments. This area is defined as the intersection of rectangles having a lower left of (0, 0) and an upper right of (width, height) for each attachment. Contents of attachments outside this area are undefined after execution of a rendering command (as defined in section 2.6)." Change-Id: Ib75be93650edd7d6a7f3d08d9206830094e3fbd8 Reviewed-on: https://swiftshader-review.googlesource.com/15469Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Since OpenGL uses the last vertex, not the leading vertex, as the vertex used to select the triangle color, then the last vertex, instead of the first vertex, has to be consistently incremented for each triangle in the strip or fan. In order to make this work, when leadingVertexFirst is true, the first vertex is consistently the lowest (consistently incremented) vertex index and when leadingVertexFirst is false, the last vertex is consistently the highest vertex index. Fixes the 2 failures in: dEQP-GLES3.functional.rasterization.flatshading Change-Id: Ib2247a219fe8c6725dc141e6860ba2ff521dde8c Reviewed-on: https://swiftshader-review.googlesource.com/15468Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
GL_R11F_G11F_B10F is a renderable format (in the EXT_color_buffer_float extension) with unsigned floating-point values, which we implement using (signed) half- or single-precision floating-point types. So we need to clamp values to a positive range before writing to them. Change-Id: Ic21a5b0b33905c0aeab35299fc268158f8c679f9 Reviewed-on: https://swiftshader-review.googlesource.com/15448Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 20 Dec, 2017 3 commits
-
-
Nicolas Capens authored
This change uses half-precision floating-point implementation formats for all OpenGL half-precision floating-point formats, as well as the R11F_G11F_B10F and RGB9_E5 special internal formats. sw::FORMAT_X16B16G16R16F was implemented for the formats without alpha. RGB9E5 conversion was optimized to not require powf(2.0, x), and 11- and 10-bit floating-point formats were optimized to map directly to 16-bit half-precision floating-point. Change-Id: Ic33f903d01f37394244aec9f53b0e67d1c978764 Reviewed-on: https://swiftshader-review.googlesource.com/15410Tested-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_UNSIGNED_INT_10F_11F_11F_REV and GL_UNSIGNED_INT_5_9_9_9_REV were using sw::FORMAT_A32B32G32R32F as the implementation format, which resulted in using bad alpha values when it was rendered into. Change-Id: If29da49a9dc7f7a52d8846417da66f7af929f276 Reviewed-on: https://swiftshader-review.googlesource.com/15408Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Instead of testing for the number of samplers used so far in the shader, the Program object was checking for the register index, which could have been larger or equal to MAX_VERTEX_TEXTURE_IMAGE_UNITS or MAX_TEXTURE_IMAGE_UNITS, making the shader compilation fail erroneously. Changed sampler arrays to maps in order to get the sampler data from the register index. Change-Id: Iba6cbf0dbbcdbd926f2670af4413710550e341a9 Reviewed-on: https://swiftshader-review.googlesource.com/15428Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 19 Dec, 2017 1 commit
-
-
Nicolas Capens authored
Change-Id: I68d7dbb445eee85e8a2ff4ac3a6fc6b31c6ea305 Reviewed-on: https://swiftshader-review.googlesource.com/15369Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-