tgsi: Implement OPCODE_ARR.
authorMichal Krol <michal@tungstengraphics.com>
Wed, 26 Nov 2008 12:17:25 +0000 (13:17 +0100)
committerMichal Krol <michal@tungstengraphics.com>
Wed, 26 Nov 2008 12:24:33 +0000 (13:24 +0100)
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_sse2.c

index 0fdfb91..1981d8b 100644 (file)
@@ -2124,6 +2124,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] );
@@ -2424,10 +2425,6 @@ exec_instruction(
       assert (0);
       break;
 
-   case TGSI_OPCODE_ARR:
-      assert (0);
-      break;
-
    case TGSI_OPCODE_BRA:
       assert (0);
       break;
index 8574d79..d2d4319 100644 (file)
@@ -2078,7 +2078,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: