[Piglit] [PATCH 09/11] mesa_shader_integer_functions: Clone arb_gpu_shader5 indirect sampler array access compiler test

Ian Romanick idr at freedesktop.org
Wed Jun 29 21:23:09 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

GL_MESA_shader_integer_functions does not add non-constant indexing of
sampler arrays.

    cd tests/spec/mesa_shader_integer_functions/compiler
    cp ../../arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag .
    sed --in-place -e 's/1[.]50/1.30/g;s/150/130/g' \
        -e 's/ARB_gpu_shader5/MESA_shader_integer_functions/g' \
        -e 's/expect_result: pass/expect_result: fail/' \
        indirect-projGradOffset-shadow.frag

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../compiler/indirect-projGradOffset-shadow.frag       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 tests/spec/mesa_shader_integer_functions/compiler/indirect-projGradOffset-shadow.frag

diff --git a/tests/spec/mesa_shader_integer_functions/compiler/indirect-projGradOffset-shadow.frag b/tests/spec/mesa_shader_integer_functions/compiler/indirect-projGradOffset-shadow.frag
new file mode 100644
index 0000000..babffe2
--- /dev/null
+++ b/tests/spec/mesa_shader_integer_functions/compiler/indirect-projGradOffset-shadow.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.30
+// require_extensions: GL_MESA_shader_integer_functions
+// [end config]
+#version 130
+#extension GL_MESA_shader_integer_functions: require
+
+uniform int i;
+uniform vec4 coord;
+uniform sampler2DShadow s[5];
+
+void main()
+{
+  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
+				  ivec2(-5, 3));
+  gl_FragColor = vec4(0, f, 0, 1);
+}
-- 
2.5.5



More information about the Piglit mailing list