summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2015-01-25 15:11:41 +1300
committerMarek Olšák <marek.olsak@amd.com>2015-07-29 21:43:48 +0200
commitd743c09623feca39d8174157c203d9d64c7b20f8 (patch)
tree5538d6ac2f8849636960ed1f0ee81c5573610379
parentfe4b48ad484eae779e313bc0a05cf85c6c96a9cf (diff)
arb_tessellation_shader: Simplify tcs-input tests.
The purpose of these tests is not to exercise the compiler's optimization of writes from the TCS -- we'll explore that in other tests. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--generated_tests/gen_tcs_input_tests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/generated_tests/gen_tcs_input_tests.py b/generated_tests/gen_tcs_input_tests.py
index 53d48e252..763c12888 100644
--- a/generated_tests/gen_tcs_input_tests.py
+++ b/generated_tests/gen_tcs_input_tests.py
@@ -210,12 +210,13 @@ out int pass[];
void main()
{{
const int vertices_in = 3;
- pass[gl_InvocationID] = 1;
+ int local_pass = 1;
for (int i = 0; i < vertices_in; ++i) {{
int vertex_ID = gl_PrimitiveID * vertices_in + i;
if ({self.interface_tcs_instance}[i]{self.tcs_var_ref} != reference[vertex_ID].v)
- pass[gl_InvocationID] = 0;
+ local_pass = 0;
}}
+ pass[gl_InvocationID] = local_pass;
gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
gl_TessLevelInner = float[2](1.0, 1.0);
}}
@@ -230,7 +231,6 @@ out vec4 vert_color;
void main()
{{
- const int vertices_in = 3;
const vec4 red = vec4(1, 0, 0, 1);
const vec4 green = vec4(0, 1, 0, 1);
vec2[3] position = vec2[3](
@@ -242,9 +242,8 @@ void main()
+ (position[1] - position[0]) * gl_TessCoord[0]
+ (position[2] - position[0]) * gl_TessCoord[1], 0.0, 1.0);
vert_color = green;
- for (int i = 0; i < vertices_in; ++i) {{
- if (pass[i] == 0)
- vert_color = red;
+ if (pass[0] == 0 || pass[1] == 0 || pass[2] == 0) {{
+ vert_color = red;
}}
}}