tgsi: remove redundant CND0 opcode
authorKeith Whitwell <keithw@vmware.com>
Tue, 1 Sep 2009 16:29:24 +0000 (17:29 +0100)
committerKeith Whitwell <keithw@vmware.com>
Tue, 1 Sep 2009 16:30:01 +0000 (17:30 +0100)
Can be implemented with CMP src2, src1, src0

src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
src/gallium/auxiliary/tgsi/tgsi_sse2.c
src/gallium/drivers/cell/spu/spu_exec.c
src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c
src/gallium/drivers/r300/r300_tgsi_to_rc.c
src/gallium/include/pipe/p_shader_tokens.h

index 802ec37..a989514 100644 (file)
@@ -187,11 +187,7 @@ TGSI Instruction Specification
 
 1.2.6  CND0 - Condition Zero
 
-  dst.x = (src2.x >= 0.0) ? src0.x : src1.x
-  dst.y = (src2.y >= 0.0) ? src0.y : src1.y
-  dst.z = (src2.z >= 0.0) ? src0.z : src1.z
-  dst.w = (src2.w >= 0.0) ? src0.w : src1.w
-
+       Removed.  Use (CMP src2, src1, src0) instead.
 
 1.2.7  DOT2ADD - 2-component Dot Product And Add
 
index 711e86d..d3ffd4a 100644 (file)
@@ -2329,16 +2329,6 @@ exec_instruction(
       }
       break;
 
-   case TGSI_OPCODE_CND0:
-      FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
-         FETCH(&r[0], 0, chan_index);
-         FETCH(&r[1], 1, chan_index);
-         FETCH(&r[2], 2, chan_index);
-         micro_le(&r[0], &mach->Temps[TEMP_0_I].xyzw[TEMP_0_C], &r[2], &r[0], &r[1]);
-         STORE(&r[0], 0, chan_index);
-      }
-      break;
-
    case TGSI_OPCODE_DP2A:
       FETCH( &r[0], 0, CHAN_X );
       FETCH( &r[1], 1, CHAN_X );
index ccf4b20..e69cd05 100644 (file)
@@ -51,7 +51,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
    { 1, 2, 0, 0, "SUB", TGSI_OPCODE_SUB },
    { 1, 3, 0, 0, "LRP", TGSI_OPCODE_LRP },
    { 1, 3, 0, 0, "CND", TGSI_OPCODE_CND },
-   { 1, 3, 0, 0, "CND0", TGSI_OPCODE_CND0 },
+   { 0, 0, 0, 0, "", 20 },      /* removed */
    { 1, 3, 0, 0, "DP2A", TGSI_OPCODE_DP2A },
    { 0, 0, 0, 0, "", 22 },      /* removed */
    { 0, 0, 0, 0, "", 23 },      /* removed */
index ed594a3..e7bcf4b 100644 (file)
@@ -60,7 +60,6 @@ OP13(MAD)
 OP12(SUB)
 OP13(LRP)
 OP13(CND)
-OP13(CND0)
 OP13(DP2A)
 OP11(FRC)
 OP13(CLAMP)
index 46f2387..3cdf8b9 100644 (file)
@@ -2089,10 +2089,6 @@ emit_instruction(
       return 0;
       break;
 
-   case TGSI_OPCODE_CND0:
-      return 0;
-      break;
-
    case TGSI_OPCODE_DP2A:
       FETCH( func, *inst, 0, 0, CHAN_X );  /* xmm0 = src[0].x */
       FETCH( func, *inst, 1, 1, CHAN_X );  /* xmm1 = src[1].x */
index 6db9501..0eaae2e 100644 (file)
@@ -1150,10 +1150,6 @@ exec_instruction(
       ASSERT (0);
       break;
 
-   case TGSI_OPCODE_CND0:
-      ASSERT (0);
-      break;
-
    case TGSI_OPCODE_DP2A:
       ASSERT (0);
       break;
index bce2660..d4d18fe 100644 (file)
@@ -687,10 +687,6 @@ emit_instruction(
       return 0;
       break;
 
-   case TGSI_OPCODE_CND0:
-      return 0;
-      break;
-
    case TGSI_OPCODE_DP2A:
       tmp0 = emit_fetch( bld, inst, 0, CHAN_X );  /* xmm0 = src[0].x */
       tmp1 = emit_fetch( bld, inst, 1, CHAN_X );  /* xmm1 = src[1].x */
index 3adbb71..d68a104 100644 (file)
@@ -53,7 +53,6 @@ static unsigned translate_opcode(unsigned opcode)
         case TGSI_OPCODE_SUB: return OPCODE_SUB;
         case TGSI_OPCODE_LRP: return OPCODE_LRP;
      /* case TGSI_OPCODE_CND: return OPCODE_CND; */
-     /* case TGSI_OPCODE_CND0: return OPCODE_CND0; */
         case TGSI_OPCODE_DP2A: return OPCODE_DP2A;
                                         /* gap */
         case TGSI_OPCODE_FRC: return OPCODE_FRC;
index f0ba4fb..5fa6c9a 100644 (file)
@@ -184,7 +184,7 @@ union tgsi_immediate_data
 #define TGSI_OPCODE_SUB                 17
 #define TGSI_OPCODE_LRP                 18
 #define TGSI_OPCODE_CND                 19
-#define TGSI_OPCODE_CND0                20
+                                /* gap */
 #define TGSI_OPCODE_DP2A                21
                                 /* gap */
 #define TGSI_OPCODE_FRC                 24