[Piglit] [PATCH 5/6] Port arb_vertex_program numeric stress tests from Glean to Piglit.

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


---
 .../spec/arb_vertex_program/divide_by_zero.shader_test | 18 ++++++++++++++++++
 .../arb_vertex_program/infinity_and_nan.shader_test    | 17 +++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 tests/spec/arb_vertex_program/divide_by_zero.shader_test
 create mode 100644 tests/spec/arb_vertex_program/infinity_and_nan.shader_test

diff --git a/tests/spec/arb_vertex_program/divide_by_zero.shader_test b/tests/spec/arb_vertex_program/divide_by_zero.shader_test
new file mode 100644
index 0000000..2b0f753
--- /dev/null
+++ b/tests/spec/arb_vertex_program/divide_by_zero.shader_test
@@ -0,0 +1,18 @@
+[require]
+GL >= 1.3
+ARB_vertex_program
+
+[vertex program]
+!!ARBvp1.0
+PARAM zero = program.local[0];
+MOV result.position, vertex.position;
+RCP result.color.x, zero.x;
+RCP result.color.y, zero.y;
+RCP result.color.z, zero.z;
+RCP result.color.w, zero.w;
+END
+
+[test]
+ortho -4 4 -4 4
+parameter local_vp 0 (0.0, 0.0, 0.0, 0.0)
+draw rect -0.25 -0.25 0.5 0.5
diff --git a/tests/spec/arb_vertex_program/infinity_and_nan.shader_test b/tests/spec/arb_vertex_program/infinity_and_nan.shader_test
new file mode 100644
index 0000000..0f3aaee
--- /dev/null
+++ b/tests/spec/arb_vertex_program/infinity_and_nan.shader_test
@@ -0,0 +1,17 @@
+[require]
+GL >= 1.3
+ARB_vertex_program
+
+[vertex program]
+!!ARBvp1.0
+PARAM zero = program.local[0];
+PARAM infNan = program.local[9];
+MOV result.position, vertex.position;
+ADD result.color, infNan, zero;
+END
+
+[test]
+ortho -4 4 -4 4
+parameter local_vp 0 (0.0, 0.0, 0.0, 0.0)
+parameter local_vp 9 (INF, -INF, NAN, 0.0)
+draw rect -0.25 -0.25 0.5 0.5
-- 
2.7.4



More information about the Piglit mailing list