progs/fp: testcases for GL_ARB_fragment_coord_conventions
authorBrian Paul <brianp@vmware.com>
Thu, 21 Jan 2010 16:38:50 +0000 (09:38 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 21 Jan 2010 16:38:50 +0000 (09:38 -0700)
Based on a patch from Luca Barbieri but moved the comments after
the !!ARBfp1.0 header

progs/fp/position-frc-integer.txt [new file with mode: 0644]
progs/fp/position-frc.txt [new file with mode: 0644]
progs/fp/position-upper-left.txt [new file with mode: 0644]
progs/fp/position.txt

diff --git a/progs/fp/position-frc-integer.txt b/progs/fp/position-frc-integer.txt
new file mode 100644 (file)
index 0000000..3a634c9
--- /dev/null
@@ -0,0 +1,7 @@
+!!ARBfp1.0
+# expected: black triangle
+# brown means the wrong pixel center convention is being used
+OPTION ARB_fragment_coord_pixel_center_integer;
+MOV result.color, {0}.x;
+FRC result.color.xy, fragment.position;
+END
diff --git a/progs/fp/position-frc.txt b/progs/fp/position-frc.txt
new file mode 100644 (file)
index 0000000..35ae3ef
--- /dev/null
@@ -0,0 +1,6 @@
+!!ARBfp1.0
+# expected: brown triangle
+# black means the wrong pixel center convention is being used
+MOV result.color, {0}.x;
+FRC result.color.xy, fragment.position;
+END
diff --git a/progs/fp/position-upper-left.txt b/progs/fp/position-upper-left.txt
new file mode 100644 (file)
index 0000000..ac632db
--- /dev/null
@@ -0,0 +1,7 @@
+!!ARBfp1.0
+# expected: the yellow vertex is the bottom one
+# if it is the top one, the wrong origin convention is being used
+OPTION ARB_fragment_coord_origin_upper_left;
+MOV result.color, {0}.x;
+MUL result.color.xy, fragment.position, {.005}.x;
+END
index 1875897d781ae5795723085ff44539cafaa2630c..f59d0259c726d2300e1b20e69df80c1d660b2c25 100644 (file)
@@ -1,4 +1,6 @@
 !!ARBfp1.0
+# expected: the yellow vertex is the top one
+# if it is the bottom one, the wrong origin convention is being used
 MOV result.color, {0}.x;
 MUL result.color.xy, fragment.position, {.005}.x;
 END