summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2008-11-26 13:17:25 +0100
committerJosé Fonseca <[email protected]>2008-11-26 21:47:09 +0900
commiteee3d216049f21507a3ff6908f1d506c683efad0 (patch)
treea7c4c5ccc66e6416a07da84b0fa050d369b3bb97 /src/gallium
parent685fd2c035e284db2447ede0f6da278adaa70a0d (diff)
tgsi: Implement OPCODE_ARR.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c5
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sse2.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 41dffc3dbaf..7114119fe29 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -2067,6 +2067,7 @@ exec_instruction(
break;
case TGSI_OPCODE_ROUND:
+ case TGSI_OPCODE_ARR:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH( &r[0], 0, chan_index );
micro_rnd( &r[0], &r[0] );
@@ -2367,10 +2368,6 @@ exec_instruction(
assert (0);
break;
- case TGSI_OPCODE_ARR:
- assert (0);
- break;
-
case TGSI_OPCODE_BRA:
assert (0);
break;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index 151d2b1c379..752c7c3c315 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -1906,7 +1906,12 @@ emit_instruction(
break;
case TGSI_OPCODE_ARR:
- return 0;
+ FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
+ FETCH( func, *inst, 0, 0, chan_index );
+ emit_rnd( func, 0, 0 );
+ emit_f2it( func, 0 );
+ STORE( func, *inst, 0, 0, chan_index );
+ }
break;
case TGSI_OPCODE_BRA: