In order to upgrade the version of glslang used by the
Fuchsia platform source tree, BUILD.gn needs to be
slightly modified to care about the case where it is
not used with the Chromium //build configuration:
- Remove a new compiler warning to ensure proper
compilation with -Werror (which is the default).
- Add a build target for spirv-remap, which is used
by Fuchsia at build time to optimize the precompiled
shaders of some of its graphics libraries.
On reading built-in variables SubgroupEqMask, SubgroupGeMask, SubgroupGtMask,
SubgroupLeMask, and SubgroupLtMask, the AST expects 64-bit ints, while SPIR-V
is defined as vectors of 32-bit ints.
The declaration type has to be translated in the opposite direction.
Add gl_SemanticsVolatile to GL_KHR_memory_scope_semantics, and make volatile-qualified atomics generate MemorySemanticsVolatile when using the Vulkan memory model
When processing Geometry and Tessellation Control/Evaluation shaders,
the builtins defined by GL_ARB_shader_ballot were not processed by
glslang. This specially a problem for gl_SubGroupSizeARB because, it is
treated as shader input instead of uniform on Vulkan.
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Including spirv and AST tests
Also increase size of TBuiltInVariable bitfields since we've now exceeded 127
and add a static_assert to make this easier to find next time it happens!
Closes#1735
GlslangToSpv.cpp
- minor formatting cleanup
BaseTypes.h
- minor formatting cleanup
- add subgroup builtins to GetBuiltInVariableString
(was resulting in "unknown built-in variable" messages in test output)
Initialize.cpp
- better naming and re-use of strings for subgroup builtin variable declarations
- define subgroup builtin variables in ray-tracing shaders
intermOut.cpp
- add handling of the EOpSubgroupParition* variables
(was resulting in "ERROR: Bad aggregation op" messages in test output)
Update test results.
with subgroup touch tests (error and non-error cases)
Currently the subgroup built-ins are NOT giving the correct output.
This is fixed in the next commit.
with subgroup touch testing (error and non-error cases)
Add missing symbolTable.relateToOperator("subgroupMemoryBarrierShared") call for
Mesh/Task shaders so they don't assert in ParseHelper.cpp
Touch test all subgroup builtins in vert, tesc, tese, geom, frag, compute shaders
before and after enabling extensions to make sure the correct errors are generated
and then not generated (after enablement).