Permalink
Browse files

tests: add test for gl_FragDepth output (produces wrong result on ES …

…now)
  • Loading branch information...
1 parent 57287d2 commit c5537e67f38d5f722745e0869f1a84ab721ca0b0 @aras-p committed Feb 24, 2013
Showing with 35 additions and 0 deletions.
  1. +5 −0 tests/fragment/fragdepth-in.txt
  2. +15 −0 tests/fragment/fragdepth-out.txt
  3. +15 −0 tests/fragment/fragdepth-outES.txt
View
5 tests/fragment/fragdepth-in.txt
@@ -0,0 +1,5 @@
+void main (out fixed4 ocol : COLOR0, out half oz : DEPTH)
+{
+ ocol = 0.5;
+ oz = 0.9;
+}
View
15 tests/fragment/fragdepth-out.txt
@@ -0,0 +1,15 @@
+void xlat_main( out vec4 ocol, out float oz );
+#line 1
+void xlat_main( out vec4 ocol, out float oz ) {
+ #line 3
+ ocol = vec4( 0.5);
+ oz = 0.9;
+}
+void main() {
+ vec4 xlt_ocol;
+ float xlt_oz;
+ xlat_main( xlt_ocol, xlt_oz);
+ gl_FragData[0] = vec4(xlt_ocol);
+ gl_FragDepth = float(xlt_oz);
+;
+}
View
15 tests/fragment/fragdepth-outES.txt
@@ -0,0 +1,15 @@
+void xlat_main( out lowp vec4 ocol, out mediump float oz );
+#line 1
+void xlat_main( out lowp vec4 ocol, out mediump float oz ) {
+ #line 3
+ ocol = vec4( 0.5);
+ oz = 0.9;
+}
+void main() {
+ lowp vec4 xlt_ocol;
+ mediump float xlt_oz;
+ xlat_main( xlt_ocol, xlt_oz);
+ gl_FragData[0] = vec4(xlt_ocol);
+ gl_FragDepth = float(xlt_oz);
+;
+}

0 comments on commit c5537e6

Please sign in to comment.