Commit d769742c by Shahbaz Youssefi Committed by Angle LUCI CQ

Vulkan: SPIR-V Gen: Default uniforms

Default uniforms are gathered in a uniform block, so treat them like other nameless uniform block fields. Bug: angleproject:4889 Change-Id: If340040ab4c59f3243c40de7daba530b2289e147 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939333Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 7108e069
......@@ -271,8 +271,9 @@ spv::StorageClass GetStorageClass(const TType &type)
return spv::StorageClassOutput;
}
// Uniform and storage buffers have the Uniform storage class
if (type.isInterfaceBlock())
// Uniform and storage buffers have the Uniform storage class. Default uniforms are gathered in
// a uniform block as well.
if (type.isInterfaceBlock() || qualifier == EvqUniform)
{
// I/O blocks must have already been classified as input or output above.
ASSERT(!IsShaderIoBlock(qualifier));
......
......@@ -10888,14 +10888,11 @@ TEST_P(GLSLTest_ES3, InitGlobalNonConstant)
constexpr char kVS[] = R"(#version 300 es
#extension GL_EXT_shader_non_constant_global_initializers : require
uniform U
{
vec4 u;
} u;
uniform vec4 u;
out vec4 color;
vec4 global1 = u.u;
vec4 global2 = u.u + vec4(1);
vec4 global1 = u;
vec4 global2 = u + vec4(1);
vec4 global3 = global1 * global2;
void main()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment