[Piglit] [PATCH 5/9] ARB_fragment_program_shadow/masked: New test for an i965 bug.
Eric Anholt
eric at anholt.net
Tue Nov 29 16:43:55 PST 2011
---
tests/all.tests | 7 +++++
.../arb_fragment_program_shadow/masked.shader_test | 26 ++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
create mode 100644 tests/spec/arb_fragment_program_shadow/masked.shader_test
diff --git a/tests/all.tests b/tests/all.tests
index b9184f4..bbee40a 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -959,6 +959,13 @@ add_shader_test_dir(arb_draw_instanced,
os.path.dirname(__file__) + '/spec/arb_draw_instanced/execution',
recursive=True)
+# Group ARB_fragment_program_shadow
+arb_fragment_program_shadow = Group()
+spec['ARB_fragment_program_shadow'] = arb_fragment_program_shadow
+add_shader_test_dir(spec['ARB_fragment_program_shadow'],
+ os.path.join(os.path.dirname(__file__), 'spec', 'arb_fragment_program_shadow'),
+ recursive=True)
+
# Group ARB_framebuffer_object
arb_framebuffer_object = Group()
spec['ARB_framebuffer_object'] = arb_framebuffer_object
diff --git a/tests/spec/arb_fragment_program_shadow/masked.shader_test b/tests/spec/arb_fragment_program_shadow/masked.shader_test
new file mode 100644
index 0000000..2856209
--- /dev/null
+++ b/tests/spec/arb_fragment_program_shadow/masked.shader_test
@@ -0,0 +1,26 @@
+[vertex program]
+!!ARBvp1.0
+MOV result.position, vertex.position;
+MAD result.texcoord[0], vertex.position, 0.5, 0.5;
+END
+
+[fragment program]
+!!ARBfp1.0
+OPTION ARB_fragment_program_shadow;
+MOV result.color.xzw, 0.125;
+TEX result.color.y, fragment.texcoord[0].xyyy, texture[0], SHADOW2D;
+END
+
+[test]
+texture shadow2D 0 (32, 32)
+texparameter2D depth_mode intensity
+texparameter2D compare_func greater
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.125, 1, 0.125, 0.125);
+relative probe rgba (0.9, 1.0) (0.125, 1, 0.125, 0.125);
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.125, 0, 0.125, 0.125);
+relative probe rgba (1.0, 0.9) (0.125, 0, 0.125, 0.125);
--
1.7.7.3
More information about the Piglit
mailing list