[Piglit] [PATCH] arb_gpu_shader5: Test corner cases of bitfieldInsert/bitfieldExtract.

Matt Turner mattst88 at gmail.com
Mon Jan 4 09:43:19 PST 2016


---
 .../fs-bitfieldExtract.shader_test                   | 18 +++++++++++++++++-
 .../built-in-functions/fs-bitfieldInsert.shader_test | 20 +++++++++++++++++++-
 .../vs-bitfieldExtract.shader_test                   | 18 +++++++++++++++++-
 .../built-in-functions/vs-bitfieldInsert.shader_test | 20 +++++++++++++++++++-
 4 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test
index 2912a69..67d7a34 100644
--- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test
@@ -46,7 +46,7 @@ vertex/float/2
 [test]
 # Corner case: bits == 0 -> result == 0
 uniform int bits 0
-uniform int offset 0
+uniform int offset 32
 
 uniform int test_signed 1
 uniform ivec4 iextract 0 0 0 0
@@ -107,3 +107,19 @@ uniform uvec4 uextract 0xF  0x0 0x1 0x3
 uniform uvec4 uinput 0x000F0000 0x0000F000 0x0001C000 0x00038000
 draw arrays GL_TRIANGLE_FAN 0 4
 probe all rgba 0.0 1.0 0.0 1.0
+
+# Copy the whole integer
+uniform int bits 32
+uniform int offset 0
+
+uniform int test_signed 1
+uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934
+uniform ivec4 iinput   3203386110 3735928559 2343432205 3741239934
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform int test_signed 0
+uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+uniform uvec4 uinput   0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test
index f0e7ab9..dbd8ffa 100644
--- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test
@@ -48,7 +48,7 @@ vertex/float/2
 [test]
 # Corner case: bits == 0 -> result == base
 uniform int bits 0
-uniform int offset 0
+uniform int offset 32
 
 uniform int test_signed 1
 uniform ivec4 iinsert 2147483647 15 7 3
@@ -107,3 +107,21 @@ uniform uvec4 ubase 0xF 0xF 0xF 0xF
 uniform uvec4 uresult 0x000E000F 0x0009000F 0x0004000F 0x0001000F
 draw arrays GL_TRIANGLE_FAN 0 4
 probe all rgba 0.0 1.0 0.0 1.0
+
+# Copy the whole integer
+uniform int bits 32
+uniform int offset 0
+
+uniform int test_signed 1
+uniform ivec4 iinsert 0 0 0 0
+uniform ivec4 ibase   3203386110 3735928559 2343432205 3741239934
+uniform ivec4 iresult 3203386110 3735928559 2343432205 3741239934
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+#
+#uniform int test_signed 0
+#uniform uvec4 uinsert 0 0 0 0
+#uniform uvec4 ubase   0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+#uniform uvec4 uresult 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+#draw arrays GL_TRIANGLE_FAN 0 4
+#probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test
index 10ce5a0..35c7fc4 100644
--- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test
@@ -50,7 +50,7 @@ vertex/float/2
 [test]
 # Corner case: bits == 0 -> result == 0
 uniform int bits 0
-uniform int offset 0
+uniform int offset 32
 
 uniform int test_signed 1
 uniform ivec4 iextract 0 0 0 0
@@ -111,3 +111,19 @@ uniform uvec4 uextract 0xF  0x0 0x1 0x3
 uniform uvec4 uinput 0x000F0000 0x0000F000 0x0001C000 0x00038000
 draw arrays GL_TRIANGLE_FAN 0 4
 probe all rgba 0.0 1.0 0.0 1.0
+
+# Copy the whole integer
+uniform int bits 32
+uniform int offset 0
+
+uniform int test_signed 1
+uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934
+uniform ivec4 iinput   3203386110 3735928559 2343432205 3741239934
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform int test_signed 0
+uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+uniform uvec4 uinput   0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test
index f4ccae6..56af3b4 100644
--- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test
@@ -52,7 +52,7 @@ vertex/float/2
 [test]
 # Corner case: bits == 0 -> result == base
 uniform int bits 0
-uniform int offset 0
+uniform int offset 32
 
 uniform int test_signed 1
 uniform ivec4 iinsert 2147483647 15 7 3
@@ -111,3 +111,21 @@ uniform uvec4 ubase 0xF 0xF 0xF 0xF
 uniform uvec4 uresult 0x000E000F 0x0009000F 0x0004000F 0x0001000F
 draw arrays GL_TRIANGLE_FAN 0 4
 probe all rgba 0.0 1.0 0.0 1.0
+
+# Copy the whole integer
+uniform int bits 32
+uniform int offset 0
+
+uniform int test_signed 1
+uniform ivec4 iinsert 0 0 0 0
+uniform ivec4 ibase   3203386110 3735928559 2343432205 3741239934
+uniform ivec4 iresult 3203386110 3735928559 2343432205 3741239934
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+#
+#uniform int test_signed 0
+#uniform uvec4 uinsert 0 0 0 0
+#uniform uvec4 ubase   0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+#uniform uvec4 uresult 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E
+#draw arrays GL_TRIANGLE_FAN 0 4
+#probe all rgba 0.0 1.0 0.0 1.0
-- 
2.4.9



More information about the Piglit mailing list