From eebe1b555f51dbb702f696d08ad5ae8153bcdcdd Mon Sep 17 00:00:00 2001 From: Pavel Ondračka Date: Wed, 6 Nov 2024 19:28:49 +0100 Subject: glsl-1.30: move tests requiring uint from glsl-1.20 Reviewed-by: Timothy Arceri Part-of: --- .../vs-loop-uint-induction-var-1.shader_test | 66 ---------------------- .../vs-loop-uint-induction-var-2.shader_test | 66 ---------------------- .../vs-loop-uint-induction-var-3.shader_test | 64 --------------------- .../vs-loop-uint-induction-var-4.shader_test | 64 --------------------- .../vs-loop-uint-induction-var-1.shader_test | 66 ++++++++++++++++++++++ .../vs-loop-uint-induction-var-2.shader_test | 66 ++++++++++++++++++++++ .../vs-loop-uint-induction-var-3.shader_test | 64 +++++++++++++++++++++ .../vs-loop-uint-induction-var-4.shader_test | 64 +++++++++++++++++++++ 8 files changed, 260 insertions(+), 260 deletions(-) delete mode 100644 tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-1.shader_test delete mode 100644 tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-2.shader_test delete mode 100644 tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-3.shader_test delete mode 100644 tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-4.shader_test create mode 100644 tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-1.shader_test create mode 100644 tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-2.shader_test create mode 100644 tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-3.shader_test create mode 100644 tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-4.shader_test diff --git a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-1.shader_test b/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-1.shader_test deleted file mode 100644 index 6c534cf8b..000000000 --- a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-1.shader_test +++ /dev/null @@ -1,66 +0,0 @@ -# This tests that we do not unroll a loop in error thinking we know the max -# trip count due to the induction variable being uint. i.e The max trip count -# here is 4294967295 with this test we are making sure the compiler doesn't -# mistakenly think the trip count is 4. -[require] -GLSL >= 1.20 - -[vertex shader] -#version 130 - -uniform uint induction_init; - -void main() -{ - gl_Position = gl_Vertex; - - vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); - vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); - - uint j = 0u; - uint i = induction_init; - while (true) { - - if (j > 4u) { - colour = vec4(1.0, 0.0, 0.0, 1.0); - } - - if (i >= 4u) { - - } else { - break; - } - - colour = vec4(0.0, 1.0, 0.0, 1.0); - - i++; - j++; - } - - gl_FrontColor = colour + colour2; -} - -[fragment shader] -void main() -{ - gl_FragColor = gl_Color; -} - -[test] -clear color 0.5 0.5 0.5 0.5 - -# unit_max 4294967295 - -# induction_init equivalent to starting at int -5 -uniform uint induction_init 4294967291 -draw rect -1 -1 2 2 -probe all rgba 1.0 0.0 0.0 1.0 - -# induction_init equivalent to starting at int -3 -uniform uint induction_init 4294967293 -draw rect -1 -1 2 2 -probe all rgba 0.0 1.0 0.0 1.0 - -uniform uint induction_init 0 -draw rect -1 -1 2 2 -probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-2.shader_test b/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-2.shader_test deleted file mode 100644 index b9268fd3d..000000000 --- a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-2.shader_test +++ /dev/null @@ -1,66 +0,0 @@ -# This tests that we do not unroll a loop in error thinking we know the max -# trip count due to the induction variable being uint. i.e The max trip count -# here is 4294967295 with this test we are making sure the compiler doesn't -# mistakenly think the trip count is 4. -[require] -GLSL >= 1.20 - -[vertex shader] -#version 130 - -uniform uint induction_init; - -void main() -{ - gl_Position = gl_Vertex; - - vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); - vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); - - uint j = 0u; - uint i = induction_init; - while (true) { - - if (j > 4u) { - colour = vec4(1.0, 0.0, 0.0, 1.0); - } - - if (3u < i) { - - } else { - break; - } - - colour = vec4(0.0, 1.0, 0.0, 1.0); - - i++; - j++; - } - - gl_FrontColor = colour + colour2; -} - -[fragment shader] -void main() -{ - gl_FragColor = gl_Color; -} - -[test] -clear color 0.5 0.5 0.5 0.5 - -# unit_max 4294967295 - -# induction_init equivalent to starting at int -5 -uniform uint induction_init 4294967291 -draw rect -1 -1 2 2 -probe all rgba 1.0 0.0 0.0 1.0 - -# induction_init equivalent to starting at int -3 -uniform uint induction_init 4294967293 -draw rect -1 -1 2 2 -probe all rgba 0.0 1.0 0.0 1.0 - -uniform uint induction_init 0 -draw rect -1 -1 2 2 -probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-3.shader_test b/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-3.shader_test deleted file mode 100644 index b4bc9be97..000000000 --- a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-3.shader_test +++ /dev/null @@ -1,64 +0,0 @@ -# This tests that we do not unroll a loop in error thinking we know the max -# trip count due to the induction variable being uint. i.e The max trip count -# here is 4294967295 with this test we are making sure the compiler doesn't -# mistakenly think the trip count is 4. -[require] -GLSL >= 1.20 - -[vertex shader] -#version 130 - -uniform uint induction_init; - -void main() -{ - gl_Position = gl_Vertex; - - vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); - vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); - - uint j = 0u; - uint i = induction_init; - while (true) { - - if (j > 4u) { - colour = vec4(1.0, 0.0, 0.0, 1.0); - } - - if (!(i >= 4u)) { - break; - } - - colour = vec4(0.0, 1.0, 0.0, 1.0); - - i++; - j++; - } - - gl_FrontColor = colour + colour2; -} - -[fragment shader] -void main() -{ - gl_FragColor = gl_Color; -} - -[test] -clear color 0.5 0.5 0.5 0.5 - -# unit_max 4294967295 - -# induction_init equivalent to starting at int -5 -uniform uint induction_init 4294967291 -draw rect -1 -1 2 2 -probe all rgba 1.0 0.0 0.0 1.0 - -# induction_init equivalent to starting at int -3 -uniform uint induction_init 4294967293 -draw rect -1 -1 2 2 -probe all rgba 0.0 1.0 0.0 1.0 - -uniform uint induction_init 0 -draw rect -1 -1 2 2 -probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-4.shader_test b/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-4.shader_test deleted file mode 100644 index 566f75a17..000000000 --- a/tests/spec/glsl-1.20/execution/vs-loop-uint-induction-var-4.shader_test +++ /dev/null @@ -1,64 +0,0 @@ -# This tests that we do not unroll a loop in error thinking we know the max -# trip count due to the induction variable being uint. i.e The max trip count -# here is 4294967295 with this test we are making sure the compiler doesn't -# mistakenly think the trip count is 4. -[require] -GLSL >= 1.20 - -[vertex shader] -#version 130 - -uniform uint induction_init; - -void main() -{ - gl_Position = gl_Vertex; - - vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); - vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); - - uint j = 0u; - uint i = induction_init; - while (true) { - - if (j > 4u) { - colour = vec4(1.0, 0.0, 0.0, 1.0); - } - - if (!(3u < i)) { - break; - } - - colour = vec4(0.0, 1.0, 0.0, 1.0); - - i++; - j++; - } - - gl_FrontColor = colour + colour2; -} - -[fragment shader] -void main() -{ - gl_FragColor = gl_Color; -} - -[test] -clear color 0.5 0.5 0.5 0.5 - -# unit_max 4294967295 - -# induction_init equivalent to starting at int -5 -uniform uint induction_init 4294967291 -draw rect -1 -1 2 2 -probe all rgba 1.0 0.0 0.0 1.0 - -# induction_init equivalent to starting at int -3 -uniform uint induction_init 4294967293 -draw rect -1 -1 2 2 -probe all rgba 0.0 1.0 0.0 1.0 - -uniform uint induction_init 0 -draw rect -1 -1 2 2 -probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-1.shader_test b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-1.shader_test new file mode 100644 index 000000000..4327e22f3 --- /dev/null +++ b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-1.shader_test @@ -0,0 +1,66 @@ +# This tests that we do not unroll a loop in error thinking we know the max +# trip count due to the induction variable being uint. i.e The max trip count +# here is 4294967295 with this test we are making sure the compiler doesn't +# mistakenly think the trip count is 4. +[require] +GLSL >= 1.30 + +[vertex shader] +#version 130 + +uniform uint induction_init; + +void main() +{ + gl_Position = gl_Vertex; + + vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); + vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); + + uint j = 0u; + uint i = induction_init; + while (true) { + + if (j > 4u) { + colour = vec4(1.0, 0.0, 0.0, 1.0); + } + + if (i >= 4u) { + + } else { + break; + } + + colour = vec4(0.0, 1.0, 0.0, 1.0); + + i++; + j++; + } + + gl_FrontColor = colour + colour2; +} + +[fragment shader] +void main() +{ + gl_FragColor = gl_Color; +} + +[test] +clear color 0.5 0.5 0.5 0.5 + +# unit_max 4294967295 + +# induction_init equivalent to starting at int -5 +uniform uint induction_init 4294967291 +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 0.0 1.0 + +# induction_init equivalent to starting at int -3 +uniform uint induction_init 4294967293 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform uint induction_init 0 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-2.shader_test b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-2.shader_test new file mode 100644 index 000000000..1fc3991d9 --- /dev/null +++ b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-2.shader_test @@ -0,0 +1,66 @@ +# This tests that we do not unroll a loop in error thinking we know the max +# trip count due to the induction variable being uint. i.e The max trip count +# here is 4294967295 with this test we are making sure the compiler doesn't +# mistakenly think the trip count is 4. +[require] +GLSL >= 1.30 + +[vertex shader] +#version 130 + +uniform uint induction_init; + +void main() +{ + gl_Position = gl_Vertex; + + vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); + vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); + + uint j = 0u; + uint i = induction_init; + while (true) { + + if (j > 4u) { + colour = vec4(1.0, 0.0, 0.0, 1.0); + } + + if (3u < i) { + + } else { + break; + } + + colour = vec4(0.0, 1.0, 0.0, 1.0); + + i++; + j++; + } + + gl_FrontColor = colour + colour2; +} + +[fragment shader] +void main() +{ + gl_FragColor = gl_Color; +} + +[test] +clear color 0.5 0.5 0.5 0.5 + +# unit_max 4294967295 + +# induction_init equivalent to starting at int -5 +uniform uint induction_init 4294967291 +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 0.0 1.0 + +# induction_init equivalent to starting at int -3 +uniform uint induction_init 4294967293 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform uint induction_init 0 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-3.shader_test b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-3.shader_test new file mode 100644 index 000000000..e3659ec9f --- /dev/null +++ b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-3.shader_test @@ -0,0 +1,64 @@ +# This tests that we do not unroll a loop in error thinking we know the max +# trip count due to the induction variable being uint. i.e The max trip count +# here is 4294967295 with this test we are making sure the compiler doesn't +# mistakenly think the trip count is 4. +[require] +GLSL >= 1.30 + +[vertex shader] +#version 130 + +uniform uint induction_init; + +void main() +{ + gl_Position = gl_Vertex; + + vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); + vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); + + uint j = 0u; + uint i = induction_init; + while (true) { + + if (j > 4u) { + colour = vec4(1.0, 0.0, 0.0, 1.0); + } + + if (!(i >= 4u)) { + break; + } + + colour = vec4(0.0, 1.0, 0.0, 1.0); + + i++; + j++; + } + + gl_FrontColor = colour + colour2; +} + +[fragment shader] +void main() +{ + gl_FragColor = gl_Color; +} + +[test] +clear color 0.5 0.5 0.5 0.5 + +# unit_max 4294967295 + +# induction_init equivalent to starting at int -5 +uniform uint induction_init 4294967291 +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 0.0 1.0 + +# induction_init equivalent to starting at int -3 +uniform uint induction_init 4294967293 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform uint induction_init 0 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-4.shader_test b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-4.shader_test new file mode 100644 index 000000000..8842ec308 --- /dev/null +++ b/tests/spec/glsl-1.30/execution/vs-loop-uint-induction-var-4.shader_test @@ -0,0 +1,64 @@ +# This tests that we do not unroll a loop in error thinking we know the max +# trip count due to the induction variable being uint. i.e The max trip count +# here is 4294967295 with this test we are making sure the compiler doesn't +# mistakenly think the trip count is 4. +[require] +GLSL >= 1.30 + +[vertex shader] +#version 130 + +uniform uint induction_init; + +void main() +{ + gl_Position = gl_Vertex; + + vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); + vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0); + + uint j = 0u; + uint i = induction_init; + while (true) { + + if (j > 4u) { + colour = vec4(1.0, 0.0, 0.0, 1.0); + } + + if (!(3u < i)) { + break; + } + + colour = vec4(0.0, 1.0, 0.0, 1.0); + + i++; + j++; + } + + gl_FrontColor = colour + colour2; +} + +[fragment shader] +void main() +{ + gl_FragColor = gl_Color; +} + +[test] +clear color 0.5 0.5 0.5 0.5 + +# unit_max 4294967295 + +# induction_init equivalent to starting at int -5 +uniform uint induction_init 4294967291 +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 0.0 1.0 + +# induction_init equivalent to starting at int -3 +uniform uint induction_init 4294967293 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform uint induction_init 0 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 -- cgit v1.2.3