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>
This commit is contained in:
committed by
GitHub
parent
232ba0d848
commit
ff6dcca575
10
Test/spv.uniformInitializer.frag
Normal file
10
Test/spv.uniformInitializer.frag
Normal file
@@ -0,0 +1,10 @@
|
||||
#version 450
|
||||
|
||||
layout (location = 0) out vec4 color;
|
||||
|
||||
layout (location = 0) uniform vec4 in_color = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
|
||||
void main()
|
||||
{
|
||||
color = in_color;
|
||||
}
|
||||
Reference in New Issue
Block a user