[Piglit] [PATCH] glsl-1.50: add tests for gl_FragCoord layout parameters
Dave Airlie
airlied at gmail.com
Sun Jan 13 20:11:54 PST 2013
From: Dave Airlie <airlied at redhat.com>
These are promoted from GL_ARB_fragment_coord_conventions.
GLSL 1.50 add two layout parameters for gl_FragCoord,
test them on their own, and in combination.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag | 12 ++++++++++++
.../glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag | 12 ++++++++++++
.../compiler/gl_FragCoord-pixel-center-integer.frag | 12 ++++++++++++
3 files changed, 36 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
create mode 100644 tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
create mode 100644 tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
diff --git a/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag b/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
new file mode 100644
index 0000000..1182c58
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// [end config]
+#version 150
+
+layout(origin_upper_left,pixel_center_integer) in vec4 gl_FragCoord;
+
+vec4 func()
+{
+ return gl_FragCoord;
+}
diff --git a/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag b/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
new file mode 100644
index 0000000..2cfc684
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// [end config]
+#version 150
+
+layout(origin_upper_left) in vec4 gl_FragCoord;
+
+vec4 func()
+{
+ return gl_FragCoord;
+}
diff --git a/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag b/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
new file mode 100644
index 0000000..7f6fa17
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// [end config]
+#version 150
+
+layout(pixel_center_integer) in vec4 gl_FragCoord;
+
+vec4 func()
+{
+ return gl_FragCoord;
+}
--
1.8.1
More information about the Piglit
mailing list