Module: Mesa
Branch: gallium-no-nvidia-opcodes
Commit: 759ccf7acee45af9f8481686fb65d2e85cf22fd0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=759ccf7acee45af9f8481686fb65d2e85cf22fd0

Author: Michal Krol <mic...@vmware.com>
Date:   Tue Mar  2 12:30:46 2010 +0100

gallium: Remove TGSI_OPCODE_RCC.

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c    |    5 ---
 .../auxiliary/tgsi/tgsi-instruction-set.txt        |    8 ----
 src/gallium/auxiliary/tgsi/tgsi_exec.c             |   35 --------------------
 src/gallium/auxiliary/tgsi/tgsi_info.c             |    2 +-
 src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h       |    1 -
 src/gallium/auxiliary/tgsi/tgsi_sse2.c             |    4 --
 src/gallium/docs/source/tgsi.rst                   |   11 ------
 src/gallium/drivers/cell/spu/spu_exec.c            |    4 --
 src/gallium/drivers/r300/r300_tgsi_to_rc.c         |    1 -
 src/gallium/include/pipe/p_shader_tokens.h         |    2 +-
 10 files changed, 2 insertions(+), 71 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c 
b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index b297e65..5224db4 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -911,11 +911,6 @@ emit_instruction(
       }
       break;
 
-   case TGSI_OPCODE_RCC:
-      /* deprecated? */
-      assert(0);
-      return 0;
-
    case TGSI_OPCODE_DPH:
       tmp0 = emit_fetch( bld, inst, 0, CHAN_X );
       tmp1 = emit_fetch( bld, inst, 1, CHAN_X );
diff --git a/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt 
b/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt
index d6fe930..e7534b8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt
+++ b/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt
@@ -317,14 +317,6 @@ TGSI Instruction Specification
   dst.w = abs(src.w)
 
 
-1.4.2  RCC - Reciprocal Clamped
-
-  dst.x = (1.0 / src.x) > 0.0 ? clamp(1.0 / src.x, 5.42101e-020, 
1.884467e+019) : clamp(1.0 / src.x, -1.884467e+019, -5.42101e-020)
-  dst.y = (1.0 / src.x) > 0.0 ? clamp(1.0 / src.x, 5.42101e-020, 
1.884467e+019) : clamp(1.0 / src.x, -1.884467e+019, -5.42101e-020)
-  dst.z = (1.0 / src.x) > 0.0 ? clamp(1.0 / src.x, 5.42101e-020, 
1.884467e+019) : clamp(1.0 / src.x, -1.884467e+019, -5.42101e-020)
-  dst.w = (1.0 / src.x) > 0.0 ? clamp(1.0 / src.x, 5.42101e-020, 
1.884467e+019) : clamp(1.0 / src.x, -1.884467e+019, -5.42101e-020)
-
-
 1.4.3  DPH - Homogeneous Dot Product
 
   dst.x = src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src1.w
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c 
b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 5274ec0..6d92b36 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -840,32 +840,6 @@ micro_div(
 }
 
 static void
-micro_float_clamp(union tgsi_exec_channel *dst,
-                  const union tgsi_exec_channel *src)
-{
-   uint i;
-
-   for (i = 0; i < 4; i++) {
-      if (src->f[i] > 0.0f) {
-         if (src->f[i] > 1.884467e+019f)
-            dst->f[i] = 1.884467e+019f;
-         else if (src->f[i] < 5.42101e-020f)
-            dst->f[i] = 5.42101e-020f;
-         else
-            dst->f[i] = src->f[i];
-      }
-      else {
-         if (src->f[i] < -1.884467e+019f)
-            dst->f[i] = -1.884467e+019f;
-         else if (src->f[i] > -5.42101e-020f)
-            dst->f[i] = -5.42101e-020f;
-         else
-            dst->f[i] = src->f[i];
-      }
-   }
-}
-
-static void
 micro_lt(
    union tgsi_exec_channel *dst,
    const union tgsi_exec_channel *src0,
@@ -2774,15 +2748,6 @@ exec_instruction(
       exec_vector_unary(mach, inst, micro_abs, TGSI_EXEC_DATA_FLOAT, 
TGSI_EXEC_DATA_FLOAT);
       break;
 
-   case TGSI_OPCODE_RCC:
-      FETCH(&r[0], 0, CHAN_X);
-      micro_div(&r[0], &mach->Temps[TEMP_1_I].xyzw[TEMP_1_C], &r[0]);
-      micro_float_clamp(&r[0], &r[0]);
-      FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
-         STORE(&r[0], 0, chan_index);
-      }
-      break;
-
    case TGSI_OPCODE_DPH:
       exec_dph(mach, inst);
       break;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c 
b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 240ab69..0162f29 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -65,7 +65,7 @@ static const struct tgsi_opcode_info 
opcode_info[TGSI_OPCODE_LAST] =
    { 1, 2, 0, 0, 0, 0, "XPD", TGSI_OPCODE_XPD },
    { 0, 0, 0, 0, 0, 0, "", 32 },      /* removed */
    { 1, 1, 0, 0, 0, 0, "ABS", TGSI_OPCODE_ABS },
-   { 1, 1, 0, 0, 0, 0, "RCC", TGSI_OPCODE_RCC },
+   { 0, 0, 0, 0, 0, 0, "", 34 },      /* removed */
    { 1, 2, 0, 0, 0, 0, "DPH", TGSI_OPCODE_DPH },
    { 1, 1, 0, 0, 0, 0, "COS", TGSI_OPCODE_COS },
    { 1, 1, 0, 0, 0, 0, "DDX", TGSI_OPCODE_DDX },
diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h 
b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index 66464f6..376df65 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -70,7 +70,6 @@ OP11(LG2)
 OP12(POW)
 OP12(XPD)
 OP11(ABS)
-OP11(RCC)
 OP12(DPH)
 OP11(COS)
 OP11(DDX)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c 
b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index 682228d..d260187 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -2210,10 +2210,6 @@ emit_instruction(
       }
       break;
 
-   case TGSI_OPCODE_RCC:
-      return 0;
-      break;
-
    case TGSI_OPCODE_DPH:
       FETCH( func, *inst, 0, 0, CHAN_X );
       FETCH( func, *inst, 1, 1, CHAN_X );
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index ad91876..fcf7dd8 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -393,17 +393,6 @@ This instruction replicates its result.
   dst.w = |src.w|
 
 
-.. opcode:: RCC - Reciprocal Clamped
-
-This instruction replicates its result.
-
-XXX cleanup on aisle three
-
-.. math::
-
-  dst = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : 
clamp(1 / src.x, -1.884467e+019, -5.42101e-020)
-
-
 .. opcode:: DPH - Homogeneous Dot Product
 
 This instruction replicates its result.
diff --git a/src/gallium/drivers/cell/spu/spu_exec.c 
b/src/gallium/drivers/cell/spu/spu_exec.c
index 42f9e90..78d0d1d 100644
--- a/src/gallium/drivers/cell/spu/spu_exec.c
+++ b/src/gallium/drivers/cell/spu/spu_exec.c
@@ -1252,10 +1252,6 @@ exec_instruction(
        }
        break;
 
-   case TGSI_OPCODE_RCC:
-      ASSERT (0);
-      break;
-
    case TGSI_OPCODE_DPH:
       FETCH(&r[0], 0, CHAN_X);
       FETCH(&r[1], 1, CHAN_X);
diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c 
b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
index 305fa4d..6f73e00 100644
--- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c
+++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
@@ -67,7 +67,6 @@ static unsigned translate_opcode(unsigned opcode)
         case TGSI_OPCODE_XPD: return RC_OPCODE_XPD;
                                         /* gap */
         case TGSI_OPCODE_ABS: return RC_OPCODE_ABS;
-     /* case TGSI_OPCODE_RCC: return RC_OPCODE_RCC; */
         case TGSI_OPCODE_DPH: return RC_OPCODE_DPH;
         case TGSI_OPCODE_COS: return RC_OPCODE_COS;
         case TGSI_OPCODE_DDX: return RC_OPCODE_DDX;
diff --git a/src/gallium/include/pipe/p_shader_tokens.h 
b/src/gallium/include/pipe/p_shader_tokens.h
index 1746113..ec472c8 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -235,7 +235,7 @@ struct tgsi_property_data {
 #define TGSI_OPCODE_XPD                 31
                                 /* gap */
 #define TGSI_OPCODE_ABS                 33
-#define TGSI_OPCODE_RCC                 34
+                                /* gap */
 #define TGSI_OPCODE_DPH                 35
 #define TGSI_OPCODE_COS                 36
 #define TGSI_OPCODE_DDX                 37

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to