summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Oliveira <igor.oliveira@openbossa.org>2010-01-18 13:59:14 -0400
committerMichal Krol <michal@vmware.com>2010-01-19 13:33:56 +0100
commitaec0b017fdc3e8773e0716e9fbc1f443edd0790f (patch)
treedea9b2d52d73c2164696a18cea768a6496d33eda
parent9f245bebf29ce08948734620db3eade3085c6673 (diff)
regress: add double opcode tests
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-ddiv.sh20
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmax.sh25
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmin.sh25
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmul.sh15
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsge.sh30
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dslt.sh30
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsqrt.sh17
-rw-r--r--src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py7
8 files changed, 169 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-ddiv.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-ddiv.sh
new file mode 100644
index 0000000000..7a28d53721
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-ddiv.sh
@@ -0,0 +1,20 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..3]
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+DMUL TEMP[0], TEMP[0], TEMP[1]
+DDIV TEMP[0], TEMP[0], TEMP[1]
+DMOV TEMP[2].zw, TEMP[0]
+DMOV TEMP[3].xy, TEMP[1].zwzw
+D2F OUT[0].x, TEMP[0]
+D2F OUT[0].y, TEMP[2]
+D2F TEMP[0].x, TEMP[1]
+D2F TEMP[1].x, TEMP[3]
+MOV OUT[0].z, TEMP[0].zzxz
+MOV OUT[0].w, TEMP[1].xxxx
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmax.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmax.sh
new file mode 100644
index 0000000000..38c3128578
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmax.sh
@@ -0,0 +1,25 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..5]
+
+IMM FLT32 { 0.4, 0.4, 0.4, 0.0 }
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+F2D TEMP[4], IMM[0]
+F2D TEMP[5], IMM[0].zwzw
+DMAX TEMP[0], TEMP[4], TEMP[0]
+DMAX TEMP[1], TEMP[5], TEMP[1]
+DMOV TEMP[2].zw, TEMP[0]
+DMOV TEMP[3].xy, TEMP[1].zwzw
+D2F OUT[0].x, TEMP[0]
+D2F OUT[0].y, TEMP[2]
+D2F TEMP[0].x, TEMP[1]
+D2F TEMP[1].x, TEMP[3]
+MOV OUT[0].z, TEMP[0].zzxz
+MOV OUT[0].w, TEMP[1].xxxx
+
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmin.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmin.sh
new file mode 100644
index 0000000000..cdc8d02684
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmin.sh
@@ -0,0 +1,25 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..5]
+
+IMM FLT32 { 0.6, 0.6, 0.6, 1.0 }
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+F2D TEMP[4], IMM[0]
+F2D TEMP[5], IMM[0].zwzw
+DMIN TEMP[0], TEMP[4], TEMP[0]
+DMIN TEMP[1], TEMP[5], TEMP[1]
+DMOV TEMP[2].zw, TEMP[0]
+DMOV TEMP[3].xy, TEMP[1].zwzw
+D2F OUT[0].x, TEMP[0]
+D2F OUT[0].y, TEMP[2]
+D2F TEMP[0].x, TEMP[1]
+D2F TEMP[1].x, TEMP[3]
+MOV OUT[0].z, TEMP[0].zzxz
+MOV OUT[0].w, TEMP[1].xxxx
+
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmul.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmul.sh
new file mode 100644
index 0000000000..a2b8efe91a
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dmul.sh
@@ -0,0 +1,15 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..1]
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+DMUL TEMP[0], TEMP[0], TEMP[0]
+DMUL TEMP[1], TEMP[1], TEMP[1]
+D2F OUT[0].xy, TEMP[0]
+D2F TEMP[1].xy, TEMP[1]
+MOV OUT[0].zw, TEMP[1].xyxy
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsge.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsge.sh
new file mode 100644
index 0000000000..20bc43628a
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsge.sh
@@ -0,0 +1,30 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..5]
+
+IMM FLT32 { 0.6, 0.6, 0.6, 0.0 }
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+F2D TEMP[4], IMM[0]
+F2D TEMP[5], IMM[0].zwzw
+
+DSGE TEMP[4], TEMP[0], TEMP[4]
+DSGE TEMP[5], TEMP[1], TEMP[5]
+
+DMUL TEMP[0], TEMP[0], TEMP[4]
+DMUL TEMP[1], TEMP[1], TEMP[5]
+
+DMOV TEMP[2].zw, TEMP[0]
+DMOV TEMP[3].xy, TEMP[1].zwzw
+D2F OUT[0].x, TEMP[0]
+D2F OUT[0].y, TEMP[2]
+D2F TEMP[0].x, TEMP[1]
+D2F TEMP[1].x, TEMP[3]
+MOV OUT[0].z, TEMP[0].zzxz
+MOV OUT[0].w, TEMP[1].xxxx
+
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dslt.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dslt.sh
new file mode 100644
index 0000000000..c96ab3e2ad
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dslt.sh
@@ -0,0 +1,30 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..5]
+
+IMM FLT32 { 0.6, 0.6, 0.6, 0.0 }
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+F2D TEMP[4], IMM[0]
+F2D TEMP[5], IMM[0].zwzw
+
+DSLT TEMP[4], TEMP[0], TEMP[4]
+DSLT TEMP[5], TEMP[1], TEMP[5]
+
+DMUL TEMP[0], TEMP[0], TEMP[4]
+DMUL TEMP[1], TEMP[1], TEMP[5]
+
+DMOV TEMP[2].zw, TEMP[0]
+DMOV TEMP[3].xy, TEMP[1].zwzw
+D2F OUT[0].x, TEMP[0]
+D2F OUT[0].y, TEMP[2]
+D2F TEMP[0].x, TEMP[1]
+D2F TEMP[1].x, TEMP[3]
+MOV OUT[0].z, TEMP[0].zzxz
+MOV OUT[0].w, TEMP[1].xxxx
+
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsqrt.sh b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsqrt.sh
new file mode 100644
index 0000000000..e1c28c89e9
--- /dev/null
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-dsqrt.sh
@@ -0,0 +1,17 @@
+FRAG
+
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0..1]
+
+F2D TEMP[0], IN[0]
+F2D TEMP[1], IN[0].zwzw
+DMUL TEMP[0], TEMP[0], TEMP[0]
+DMUL TEMP[1], TEMP[1], TEMP[1]
+DSQRT TEMP[0], TEMP[0]
+DSQRT TEMP[1], TEMP[1]
+D2F OUT[0].xy, TEMP[0]
+D2F TEMP[1].xy, TEMP[1]
+MOV OUT[0].zw, TEMP[1].xyxy
+
+END
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py b/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
index 9f3edc0f7c..4372c4ad4b 100644
--- a/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
@@ -186,6 +186,13 @@ def main():
'add',
'dadd',
'dmov',
+ 'ddiv',
+ 'dmax',
+ 'dmin',
+ 'dmul',
+ 'dsge',
+ 'dslt',
+ 'dsqrt',
'dp3',
'dp4',
'dst',