Test if uniforms in anonymous blocks do not match loose uniforms with
the same name in a different stage.
Components: OpenGL
VK-GL-CTS issue: 707
Affects:
KHR-GLES3.shaders.uniform_block.common.name_matching
KHR-GL33.shaders.uniform_block.common.name_matching
Change-Id: Ib1ea850ffbea7eb62ddbd6008463c8855f764c7e
if (!Test(vs3, fs3, GL_TRUE))
return STOP;
+ std::string vs4("precision highp float;\n"
+ "layout (std140) uniform Data { float f; };\n"
+ "void main() {\n"
+ " gl_Position = vec4(f);\n"
+ "}\n");
+ std::string fs4("precision highp float;\n"
+ "uniform float f;\n"
+ "out vec4 color;\n"
+ "void main() {\n"
+ " color = vec4(f);\n"
+ "}\n");
+
+ // check if link error is generated when the same name is used for block and non-block uniform
+ if (!Test(vs4, fs4, GL_FALSE))
+ return STOP;
+
m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
return STOP;
}