[Piglit] [PATCH] arbvp-clamp-vertex-color.shader_test: test vertex color clamping with ARB_vp

Brian Paul brianp at vmware.com
Thu Apr 5 14:53:53 PDT 2012


Similar to glsl-clamp-vertex-color.shader_test but use ARB vertex/fragment
programs.
---
 tests/shaders/arbvp-clamp-vertex-color.shader_test |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 tests/shaders/arbvp-clamp-vertex-color.shader_test

diff --git a/tests/shaders/arbvp-clamp-vertex-color.shader_test b/tests/shaders/arbvp-clamp-vertex-color.shader_test
new file mode 100644
index 0000000..2187179
--- /dev/null
+++ b/tests/shaders/arbvp-clamp-vertex-color.shader_test
@@ -0,0 +1,19 @@
+[require]
+GL_ARB_vertex_program
+GL_ARB_fragment_program
+
+[vertex program]
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+# Emit any color larger than (1,1,1,1):
+MOV result.color, {20.0, 20.0, 20.0, 20.0};
+END
+
+[fragment program]
+!!ARBfp1.0
+MUL result.color, fragment.color, {0.5, 0.5, 0.5, 0.5};
+END
+
+[test]
+draw rect -1 -1 2 2
+probe rgba 1 1 0.5 0.5 0.5 0.5
-- 
1.7.3.4



More information about the Piglit mailing list