spirv: Support initializers on uniforms (#1588)
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 4 Jun 2020 07:39:31 +0000 (09:39 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 07:39:31 +0000 (01:39 -0600)
commitff6dcca5750659306c4c68d9f176d295f5445965
treeeca7a655af95c0e6054c5ab7b43b07a422fc40f1
parent232ba0d848d19e385d719422435a041f6e08bb74
spirv: Support initializers on uniforms (#1588)

If a uniform has an initializer it will now be given as the optional
initializer operand to the OpVariable instruction.

Fixes: https://github.com/KhronosGroup/glslang/issues/1259

Signed-off-by: Neil Roberts <nroberts@igalia.com> (the code)
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> (the tests)
Signed-off-by: Arcady Goldmints-Orlov <agoldmints@igalia.com>
Co-authored-by: Neil Roberts <nroberts@igalia.com>
SPIRV/GlslangToSpv.cpp
Test/baseResults/spv.uniformInitializer.frag.out [new file with mode: 0644]
Test/baseResults/spv.uniformInitializerSpecConstant.frag.out [new file with mode: 0644]
Test/baseResults/spv.uniformInitializerStruct.frag.out [new file with mode: 0644]
Test/spv.uniformInitializer.frag [new file with mode: 0644]
Test/spv.uniformInitializerSpecConstant.frag [new file with mode: 0644]
Test/spv.uniformInitializerStruct.frag [new file with mode: 0644]
gtests/Spv.FromFile.cpp