[Piglit] [PATCH 4/6] Port arb_vertex_program position writes tests from Glean to Piglit.

Fabian Bieler fabianbieler at fastmail.fm
Sat Dec 2 20:49:18 UTC 2017


---
 .../compute_position_from_texcoord.shader_test     | 18 +++++++++++++++++
 tests/spec/arb_vertex_program/z-write.shader_test  | 23 ++++++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 tests/spec/arb_vertex_program/compute_position_from_texcoord.shader_test
 create mode 100644 tests/spec/arb_vertex_program/z-write.shader_test

diff --git a/tests/spec/arb_vertex_program/compute_position_from_texcoord.shader_test b/tests/spec/arb_vertex_program/compute_position_from_texcoord.shader_test
new file mode 100644
index 0000000..c55bd83
--- /dev/null
+++ b/tests/spec/arb_vertex_program/compute_position_from_texcoord.shader_test
@@ -0,0 +1,18 @@
+[require]
+GL >= 1.3
+ARB_vertex_program
+
+[vertex program]
+!!ARBvp1.0
+ATTRIB texcoord = vertex.texcoord[0];
+PARAM scale = {0.5, 0.5, 0.0, 1.0};
+PARAM bias = {-0.25, -0.25, 0.0, 0.0};
+MAD result.position, texcoord, scale, bias;
+MOV result.color, vertex.color;
+END
+
+[test]
+ortho -4 4 -4 4
+color 0.25 0.75 0.5 0.25
+draw rect tex -0.25 -0.25 0.5 0.5 0 0 1 1
+relative probe rgba (0.5, 0.5) (0.25, 0.75, 0.5, 0.25)
diff --git a/tests/spec/arb_vertex_program/z-write.shader_test b/tests/spec/arb_vertex_program/z-write.shader_test
new file mode 100644
index 0000000..008aca7
--- /dev/null
+++ b/tests/spec/arb_vertex_program/z-write.shader_test
@@ -0,0 +1,23 @@
+[require]
+GL >= 1.3
+ARB_vertex_program
+depthbuffer
+
+[vertex program]
+!!ARBvp1.0
+PARAM p1 = program.local[1];
+MOV result.position, vertex.position;
+MOV result.position.z, p1.y;
+MOV result.color, vertex.color;
+END
+
+[test]
+enable GL_DEPTH_TEST
+clear depth 1
+ortho -4 4 -4 4
+color 0.25 0.75 0.5 0.25
+parameter local_vp 1 (0.5, 0.25, 0.9, 0.5)
+clear
+draw rect -0.25 -0.25 0.5 0.5
+relative probe rgba (0.5, 0.5) (0.25, 0.75, 0.5, 0.25)
+probe depth 125 125 0.625
-- 
2.7.4



More information about the Piglit mailing list