[Piglit] [PATCH 02/37] glean/tfragprog1: port ABS test to shader_runner
Dylan Baker
dylan at pnwbakers.com
Mon May 2 21:59:04 UTC 2016
Possible duplicate tests:
shaders/fp-abs-01.c
shaders/fp-abs-02.c
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
tests/all.py | 2 +-
tests/glean/tfragprog1.cpp | 13 -------------
.../built-in-functions/abs.shader_test | 16 ++++++++++++++++
3 files changed, 17 insertions(+), 14 deletions(-)
create mode 100644 tests/spec/arb_fragment_program/built-in-functions/abs.shader_test
diff --git a/tests/all.py b/tests/all.py
index 395f964..217216e 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -375,7 +375,7 @@ glean_glsl_tests = ['Primary plus secondary color',
'varying read but not written',
'texcoord varying']
-glean_fp_tests = ['ABS test',
+glean_fp_tests = [
'ADD test',
'ADD with saturation',
'ADD an immediate',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index 837382c..bc340ed 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,19 +82,6 @@ static GLfloat FogCoord = 50.0; /* Between FogStart and FogEnd */
// Alphabetical order, please
static const FragmentProgram Programs[] = {
{
- "ABS test",
- "!!ARBfp1.0\n"
- "PARAM p = program.local[2]; \n"
- "ABS result.color, p; \n"
- "END \n",
- { ABS(Param2[0]),
- ABS(Param2[1]),
- ABS(Param2[2]),
- ABS(Param2[3])
- },
- DONT_CARE_Z,
- },
- {
"ADD test",
"!!ARBfp1.0\n"
"PARAM p = program.local[1]; \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/abs.shader_test b/tests/spec/arb_fragment_program/built-in-functions/abs.shader_test
new file mode 100644
index 0000000..87949d1
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/abs.shader_test
@@ -0,0 +1,16 @@
+[require]
+GL_ARB_fragment_program
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+ABS result.color, p;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 (0.0, -1.0, 0.25, -0.5)
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.25 0.5
--
2.8.2
More information about the Piglit
mailing list