From 37661516ea3862ac4c94d8bcf5064bbb95f31aea Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 3 Apr 2009 16:36:20 +0200 Subject: [PATCH] python/regress: Add relative addressing tests. --- .../tests/regress/vertex-shader/vert-arl.sh | 23 +++++++++++++++++++ .../tests/regress/vertex-shader/vert-arr.sh | 23 +++++++++++++++++++ .../tests/regress/vertex-shader/vert-flr.sh | 23 +++++++++++++++++++ .../regress/vertex-shader/vertex-shader.py | 3 +++ 4 files changed, 72 insertions(+) create mode 100644 src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arl.sh create mode 100644 src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arr.sh create mode 100644 src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-flr.sh diff --git a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arl.sh b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arl.sh new file mode 100644 index 00000000000..7638e96346e --- /dev/null +++ b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arl.sh @@ -0,0 +1,23 @@ +VERT1.1 + +DCL IN[0], POSITION +DCL OUT[0], POSITION +DCL OUT[1], COLOR + +DCL TEMP[0] + +DCL ADDR[0] + +IMM FLT32 { 3.0, 1.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 0.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 0.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 1.0, 1.0 } + +MOV OUT[0], IN[0] +MUL TEMP[0], IN[0], IMM[0] +ARL ADDR[0].x, TEMP[0] +MOV OUT[1], IMM[ADDR[0].x + 3] + +END diff --git a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arr.sh b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arr.sh new file mode 100644 index 00000000000..28ce6f9a0cf --- /dev/null +++ b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-arr.sh @@ -0,0 +1,23 @@ +VERT1.1 + +DCL IN[0], POSITION +DCL OUT[0], POSITION +DCL OUT[1], COLOR + +DCL TEMP[0] + +DCL ADDR[0] + +IMM FLT32 { 3.0, 1.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 0.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 0.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 1.0, 1.0 } + +MOV OUT[0], IN[0] +MUL TEMP[0], IN[0], IMM[0] +ARR ADDR[0].x, TEMP[0] +MOV OUT[1], IMM[ADDR[0].x + 3] + +END diff --git a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-flr.sh b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-flr.sh new file mode 100644 index 00000000000..44ad708119d --- /dev/null +++ b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vert-flr.sh @@ -0,0 +1,23 @@ +VERT1.1 + +DCL IN[0], POSITION +DCL OUT[0], POSITION +DCL OUT[1], COLOR + +DCL TEMP[0] + +DCL ADDR[0] + +IMM FLT32 { 3.0, 1.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 0.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 0.0, 1.0, 1.0 } +IMM FLT32 { 1.0, 1.0, 0.0, 1.0 } +IMM FLT32 { 0.0, 1.0, 1.0, 1.0 } + +MOV OUT[0], IN[0] +MUL TEMP[0], IN[0], IMM[0] +FLR ADDR[0].x, TEMP[0] +MOV OUT[1], IMM[ADDR[0].x + 3] + +END diff --git a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py index 7fc5f5ec514..6a927f59575 100644 --- a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py +++ b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py @@ -206,10 +206,13 @@ def main(): tests = [ 'abs', 'add', + 'arl', + 'arr', 'dp3', 'dp4', 'dst', 'ex2', + 'flr', 'frc', 'lg2', 'lit', -- 2.30.2