summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-08-25 17:30:09 +0100
committerDave Airlie <airlied@redhat.com>2011-08-25 17:31:56 +0100
commitc5dcd89482a2d8b3c90fd4f7b500998e973c01d7 (patch)
tree943f328a9820e148aceb1df3fb9e4d29c0d6d8e8
parent503c0cfef930e1f89a4c80166a4a2a1fc516351d (diff)
glsl-1.30: add compiler tests for texelFetch and texelFetchOffset.
The second one hits an assert in the glsl compiler.. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--tests/spec/glsl-1.30/compiler/texture/texelFetch.frag16
-rw-r--r--tests/spec/glsl-1.30/compiler/texture/texelFetchOffset.frag17
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/compiler/texture/texelFetch.frag b/tests/spec/glsl-1.30/compiler/texture/texelFetch.frag
new file mode 100644
index 000000000..9743aa1e4
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/texture/texelFetch.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.30
+// [end_config]
+
+#version 130
+
+uniform sampler2D a;
+uniform ivec2 pos;
+uniform int lod;
+
+float f() {
+ vec4 x;
+ x = texelFetch(a, pos, lod);
+ return x.x;
+}
diff --git a/tests/spec/glsl-1.30/compiler/texture/texelFetchOffset.frag b/tests/spec/glsl-1.30/compiler/texture/texelFetchOffset.frag
new file mode 100644
index 000000000..7dac49d02
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/texture/texelFetchOffset.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.30
+// [end_config]
+
+#version 130
+
+uniform sampler2D a;
+uniform ivec2 pos;
+uniform ivec2 offset;
+uniform int lod;
+
+float f() {
+ vec4 x;
+ x = texelFetchOffset(a, pos, lod, offset);
+ return x.x;
+}