[Mesa-dev] [PATCH 3/3] fp-dst-aliasing-*: Tests for DST with a src = dst

Eric Anholt eric at anholt.net
Thu Jul 7 17:14:48 PDT 2011


The 965 driver was failing while breaking it down into channel-wise
operations and overwriting the operands.
---
 tests/all.tests                              |    2 ++
 tests/shaders/generic/fp-dst-aliasing-1.vpfp |   16 ++++++++++++++++
 tests/shaders/generic/fp-dst-aliasing-2.vpfp |   16 ++++++++++++++++
 3 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 tests/shaders/generic/fp-dst-aliasing-1.vpfp
 create mode 100644 tests/shaders/generic/fp-dst-aliasing-2.vpfp

diff --git a/tests/all.tests b/tests/all.tests
index 7754e17..1e43d27 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -471,6 +471,8 @@ add_vpfpgeneric('fogcoord-dp4')
 add_vpfpgeneric('fp-arb-fragment-coord-conventions-none')
 add_vpfpgeneric('fp-arb-fragment-coord-conventions-integer')
 add_vpfpgeneric('fp-cmp')
+add_vpfpgeneric('fp-dst-aliasing-1')
+add_vpfpgeneric('fp-dst-aliasing-2')
 add_vpfpgeneric('fp-ex2-sat')
 add_vpfpgeneric('fp-two-constants')
 add_vpfpgeneric('nv-mov')
diff --git a/tests/shaders/generic/fp-dst-aliasing-1.vpfp b/tests/shaders/generic/fp-dst-aliasing-1.vpfp
new file mode 100644
index 0000000..38a901a
--- /dev/null
+++ b/tests/shaders/generic/fp-dst-aliasing-1.vpfp
@@ -0,0 +1,16 @@
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+END
+
+!!ARBfp1.0
+TEMP temp;
+MOV temp, program.local[0];
+DST temp, temp.xyyw, program.local[1];
+MOV result.color, temp;
+END
+
+!!test
+fragment.local[0] 0.1 0.2 0.3 0.4
+fragment.local[1] 0.5 0.5 0.5 0.5
+expected          1.0 0.1 0.2 0.5
+
diff --git a/tests/shaders/generic/fp-dst-aliasing-2.vpfp b/tests/shaders/generic/fp-dst-aliasing-2.vpfp
new file mode 100644
index 0000000..e757cd6
--- /dev/null
+++ b/tests/shaders/generic/fp-dst-aliasing-2.vpfp
@@ -0,0 +1,16 @@
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+END
+
+!!ARBfp1.0
+TEMP temp;
+MOV temp, program.local[1];
+DST temp, program.local[0], temp.xyzy;
+MOV result.color, temp;
+END
+
+!!test
+fragment.local[0] 0.1 0.2 0.3 0.4
+fragment.local[1] 0.5 0.5 0.5 0.5
+expected          1.0 0.1 0.3 0.5
+
-- 
1.7.5.4



More information about the mesa-dev mailing list