[Piglit] [PATCH 8/9] ARB_fragment_program/lrp_sat: Convert lrp_sat.fp to shader_runner.

Eric Anholt eric at anholt.net
Tue Nov 29 16:43:58 PST 2011


---
 tests/shaders/generic/lrp_sat.fp                   |   15 --------------
 .../spec/arb_fragment_program/lrp_sat.shader_test  |   21 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 15 deletions(-)
 delete mode 100644 tests/shaders/generic/lrp_sat.fp
 create mode 100644 tests/spec/arb_fragment_program/lrp_sat.shader_test

diff --git a/tests/shaders/generic/lrp_sat.fp b/tests/shaders/generic/lrp_sat.fp
deleted file mode 100644
index b98033b..0000000
--- a/tests/shaders/generic/lrp_sat.fp
+++ /dev/null
@@ -1,15 +0,0 @@
-1 3 0
-tc
- 0.5 0.0 1.0 0.0
- 1.5 4.5 2.0 1.0
--0.5 4.5 3.5 1.0
-tex
-expected
- 0.25 0.5 0.5 0.5
-
-!!ARBfp1.0
-TEMP r0;
-LRP_SAT r0, fragment.texcoord[0], fragment.texcoord[1], fragment.texcoord[2];
-MUL result.color, 0.5, r0;
-END
-; comment
diff --git a/tests/spec/arb_fragment_program/lrp_sat.shader_test b/tests/spec/arb_fragment_program/lrp_sat.shader_test
new file mode 100644
index 0000000..2f06e48
--- /dev/null
+++ b/tests/spec/arb_fragment_program/lrp_sat.shader_test
@@ -0,0 +1,21 @@
+[vertex program]
+!!ARBvp1.0
+MOV result.position, vertex.position;
+MOV result.texcoord[0], program.env[0];
+MOV result.texcoord[1], program.env[1];
+MOV result.texcoord[2], program.env[2];
+END
+
+[fragment program]
+!!ARBfp1.0
+TEMP r0;
+LRP_SAT r0, fragment.texcoord[0], fragment.texcoord[1], fragment.texcoord[2];
+MUL result.color, 0.5, r0;
+END
+
+[test]
+parameter env_vp 0 (0.5, 0.0, 1.0, 0.0)
+parameter env_vp 1 (1.5, 4.5, 2.0, 1.0)
+parameter env_vp 2 (-0.5, 4.5, 3.5, 1.0)
+draw rect -1 -1 2 2
+probe all rgba 0.25 0.5 0.5 0.5
-- 
1.7.7.3



More information about the Piglit mailing list