|
ebe943e2
|
2021-07-29T11:19:33
|
|
Vulkan: SPIR-V Gen: Fix gl_Clip/CullDistance
These built-ins can be redeclared in the shader. The translator took
these redeclarations (and gl_LastFragData) as UserDefined symbols.
There were a number of hacks such as in name generation and
CollectVariables, to special-case these redeclarations.
This change instead makes sure that these variables continue to be
considered built-ins with the appropriate qualifiers. A number of fixes
are made accordingly:
- Hacks are removed.
- In fragment shaders, ANGLEClipDistance was initialized with
gl_ClipDistance for further use by the shader. The code generation
however mistakenly produced `gl_ClipDistance[0] =
ANGLEClipDistance[0];`, which caused compilation failures by glslang,
but passed the tests accidentally because they expected link failures
(see next item).
- CollectVariables is fixed to correctly collect gl_Clip/CullDistance
in fragment shaders; previously they were collected as output
varyings, and therefore the aforementioned link error was not produced
in the tests after the compilation error was fixed.
Additional fixes:
- The transformation of gl_Clip/CullDistance was always ever done on one
of them due to misplaced breaks in the loop that detected their
presence.
- The transformation of gl_CullDistance was skipped when it was not
redeclared.
Validation is added to make sure these built-ins always have the correct
qualifier even when redeclared. SPIR-V gen support for these variables
have been fixed as well.
Bug: angleproject:4889
Change-Id: Ic8bf2c508357035cb937ef41a28ae22ffc533ebe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3059921
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a6b16d29
|
2021-03-02T19:04:57
|
|
Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone
We only support ES2 on Ozone, so tests that depend on ES3 or ES31
support are not instantiated there.
Bug: chromium:1183147
Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
9229b805
|
2020-12-14T14:10:28
|
|
Vulkan: Add the tests for EXT_clip_cull_distance
Before supporting EXT_clip_cull_distance extension,
some tests are added to validate the implementation
of EXT_clip_cull_distance extension. These tests are
implemented based on the tests for APPLE_clip_distance
Bug: angleproject:5458
Tests: angle_end2end_tests --gtest_filter=Clip*DistanceTest*
angle_unittests --gtest_filter=*Clip*Distance*
Change-Id: I018c72ae8f0aff616c9d2600e63246e9609cf3de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2585986
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dadd1986
|
2020-04-21T01:50:00
|
|
Implement GL_APPLE_clip_distance
- Built-in variable gl_ClipDistance has been added to compiler.
- Desktop GL: gl_ClipDistance is supported since GL 3.0. Enable/Disable
each gl_ClipDistances[i] works out of the box via glEnable().
- Vulkan/Metal: Use uniform variable to control writing to each
gl_ClipDistance. One bit flag controls one element in the gl_ClipDistance
array. The writing to the disabled element in vertex shader will be
ignored, and turned into zero assignment instead.
- Direct3D/Mobile GL: Not implemented yet.
- Added ClipDistanceTest to gl_tests and compiler unittests.
- GL_APPLE_clip_distance is a subset of GL_EXT_clip_cull_distance, so
GL_EXT_clip_cull_distance could be implemented in future if needed.
Bug: angleproject:4452
Change-Id: I571ac8b56826989808a680226a04bec4cf59988e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084324
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|