<Test name="same_variable_and_instance_name_fragment">
<TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
</Test>
- <Test name="repeated_block_vertex">
- <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
- </Test>
- <Test name="repeated_block_fragment">
- <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
- </Test>
- <Test name="repeated_block_no_instance_name_vertex">
- <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
- </Test>
- <Test name="repeated_block_no_instance_name_fragment">
- <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
- </Test>
<Test name="struct_member_vertex">
<TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
</Test>
<Test name="double_underscore_instance_name_fragment">
<TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
</Test>
+ <Test name="repeated_block_vertex">
+ <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+ </Test>
+ <Test name="repeated_block_fragment">
+ <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+ </Test>
+ <Test name="repeated_block_no_instance_name_vertex">
+ <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+ </Test>
+ <Test name="repeated_block_no_instance_name_fragment">
+ <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+ </Test>
</TestCase>
</TestSuite>
<TestCase name="discard">
dEQP-GLES3.functional.shaders.uniform_block.valid.same_variable_and_block_name_fragment
dEQP-GLES3.functional.shaders.uniform_block.valid.same_variable_and_instance_name_vertex
dEQP-GLES3.functional.shaders.uniform_block.valid.same_variable_and_instance_name_fragment
-dEQP-GLES3.functional.shaders.uniform_block.valid.repeated_block_vertex
-dEQP-GLES3.functional.shaders.uniform_block.valid.repeated_block_fragment
-dEQP-GLES3.functional.shaders.uniform_block.valid.repeated_block_no_instance_name_vertex
-dEQP-GLES3.functional.shaders.uniform_block.valid.repeated_block_no_instance_name_fragment
dEQP-GLES3.functional.shaders.uniform_block.valid.struct_member_vertex
dEQP-GLES3.functional.shaders.uniform_block.valid.struct_member_fragment
dEQP-GLES3.functional.shaders.uniform_block.valid.struct_member_layout_row_major_vertex
dEQP-GLES3.functional.shaders.uniform_block.invalid.double_underscore_block_name_fragment
dEQP-GLES3.functional.shaders.uniform_block.invalid.double_underscore_instance_name_vertex
dEQP-GLES3.functional.shaders.uniform_block.invalid.double_underscore_instance_name_fragment
+dEQP-GLES3.functional.shaders.uniform_block.invalid.repeated_block_vertex
+dEQP-GLES3.functional.shaders.uniform_block.invalid.repeated_block_fragment
+dEQP-GLES3.functional.shaders.uniform_block.invalid.repeated_block_no_instance_name_vertex
+dEQP-GLES3.functional.shaders.uniform_block.invalid.repeated_block_no_instance_name_fragment
dEQP-GLES3.functional.shaders.discard.basic_always
dEQP-GLES3.functional.shaders.discard.basic_never
dEQP-GLES3.functional.shaders.discard.basic_uniform
}
""
end
- case repeated_block_vertex
- version 300 es
- expect build_successful
-
- vertex ""
- #version 300 es
- precision highp float;
-
-
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlockA;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlockB;
-
- void main()
- {
- gl_Position = uniformBlockA.uniformMember + uniformBlockB.uniformMember;
- }
- ""
-
- fragment ""
- #version 300 es
- precision highp float;
-
- layout(location=0) out vec4 o_color;
-
- void main()
- {
- o_color = vec4(1.0);
- }
- ""
- end
- case repeated_block_fragment
- version 300 es
- expect build_successful
-
- vertex ""
- #version 300 es
- precision highp float;
-
- in vec4 a_pos;
-
- void main()
- {
- gl_Position = a_pos;
- }
- ""
-
- fragment ""
- #version 300 es
- precision highp float;
-
- layout(location=0) out vec4 o_color;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlockA;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlockB;
-
- void main()
- {
- o_color = uniformBlockA.uniformMember + uniformBlockB.uniformMember;
- }
- ""
- end
- case repeated_block_no_instance_name_vertex
- version 300 es
- expect build_successful
-
- vertex ""
- #version 300 es
- precision highp float;
-
-
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlock;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- };
-
- void main()
- {
- gl_Position = uniformBlock.uniformMember + uniformMember;
- }
- ""
-
- fragment ""
- #version 300 es
- precision highp float;
-
- layout(location=0) out vec4 o_color;
-
- void main()
- {
- o_color = vec4(1.0);
- }
- ""
- end
- case repeated_block_no_instance_name_fragment
- version 300 es
- expect build_successful
-
- vertex ""
- #version 300 es
- precision highp float;
-
- in vec4 a_pos;
-
- void main()
- {
- gl_Position = a_pos;
- }
- ""
-
- fragment ""
- #version 300 es
- precision highp float;
-
- layout(location=0) out vec4 o_color;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- } uniformBlock;
-
- uniform UniformBlock
- {
- vec4 uniformMember;
- };
-
- void main()
- {
- o_color = uniformBlock.uniformMember + uniformMember;
- }
- ""
- end
case struct_member_vertex
version 300 es
expect build_successful
}
""
end
+ case repeated_block_vertex
+ version 300 es
+ expect build_successful
+
+ vertex ""
+ #version 300 es
+ precision highp float;
+
+
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlockA;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlockB;
+
+ void main()
+ {
+ gl_Position = uniformBlockA.uniformMember + uniformBlockB.uniformMember;
+ }
+ ""
+
+ fragment ""
+ #version 300 es
+ precision highp float;
+
+ layout(location=0) out vec4 o_color;
+
+ void main()
+ {
+ o_color = vec4(1.0);
+ }
+ ""
+ end
+ case repeated_block_fragment
+ version 300 es
+ expect build_successful
+
+ vertex ""
+ #version 300 es
+ precision highp float;
+
+ in vec4 a_pos;
+
+ void main()
+ {
+ gl_Position = a_pos;
+ }
+ ""
+
+ fragment ""
+ #version 300 es
+ precision highp float;
+
+ layout(location=0) out vec4 o_color;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlockA;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlockB;
+
+ void main()
+ {
+ o_color = uniformBlockA.uniformMember + uniformBlockB.uniformMember;
+ }
+ ""
+ end
+ case repeated_block_no_instance_name_vertex
+ version 300 es
+ expect build_successful
+
+ vertex ""
+ #version 300 es
+ precision highp float;
+
+
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlock;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ };
+
+ void main()
+ {
+ gl_Position = uniformBlock.uniformMember + uniformMember;
+ }
+ ""
+
+ fragment ""
+ #version 300 es
+ precision highp float;
+
+ layout(location=0) out vec4 o_color;
+
+ void main()
+ {
+ o_color = vec4(1.0);
+ }
+ ""
+ end
+ case repeated_block_no_instance_name_fragment
+ version 300 es
+ expect build_successful
+
+ vertex ""
+ #version 300 es
+ precision highp float;
+
+ in vec4 a_pos;
+
+ void main()
+ {
+ gl_Position = a_pos;
+ }
+ ""
+
+ fragment ""
+ #version 300 es
+ precision highp float;
+
+ layout(location=0) out vec4 o_color;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ } uniformBlock;
+
+ uniform UniformBlock
+ {
+ vec4 uniformMember;
+ };
+
+ void main()
+ {
+ o_color = uniformBlock.uniformMember + uniformMember;
+ }
+ ""
+ end
end # invalid
+ createCases("no_instance_name", noInstanceNameShaderTemplate, True)
+ createCases("same_variable_and_block_name", sameVariableAndBlockNameShaderTemplate, True)
+ createCases("same_variable_and_instance_name", sameVariableAndInstanceNameShaderTemplate, True)
- + createCases("repeated_block", repeatedBlockShaderTemplate, True)
- + createCases("repeated_block_no_instance_name", repeatedBlockNoInstanceNameShaderTemplate, True)
+ createCases("struct_member", structMemberShaderTemplate, True)
+ sum([createCases("struct_member_layout_%s" % qualifier, layoutStructMemberQualifierShaderTemplate % qualifier, True)
for qualifier in ["row_major", "column_major"]], [])
+ createCases("invalid_identifier_instance_name", invalidIdentifierInstanceNameShaderTemplate, False)
+ createCases("double_underscore_block_name", doubleUnderscoreIdentifierBlockNameShaderTemplate, False)
+ createCases("double_underscore_instance_name", doubleUnderscoreIdentifierInstanceNameShaderTemplate, False)
+ + createCases("repeated_block", repeatedBlockShaderTemplate, True)
+ + createCases("repeated_block_no_instance_name", repeatedBlockNoInstanceNameShaderTemplate, True)
)
allCases.append(CaseGroup("valid", "Valid uniform interface block syntax tests.", validCases))