summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-03-02 12:30:46 +0100
committerMichal Krol <michal@vmware.com>2010-03-02 12:30:46 +0100
commit759ccf7acee45af9f8481686fb65d2e85cf22fd0 (patch)
treeea1ea226774822bb635baaaa2f08d67e3a0c727d
parent0d87cea21c55fdec57a55965a9d468bfb688bdad (diff)
gallium: Remove TGSI_OPCODE_RCC.
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c5
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt8
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c35
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sse2.c4
-rw-r--r--src/gallium/docs/source/tgsi.rst11
-rw-r--r--src/gallium/drivers/cell/spu/spu_exec.c4
-rw-r--r--src/gallium/drivers/r300/r300_tgsi_to_rc.c1
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h2
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 b297e652e3b..5224db4a323 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 d6fe930e047..e7534b8f2e7 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 5274ec0a7fb..6d92b36a9c4 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 240ab696994..0162f29fcc5 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 66464f6fcca..376df650d80 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 682228db457..d260187178e 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 ad918762dbd..fcf7dd88a91 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 42f9e908e90..78d0d1db388 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 305fa4d09c8..6f73e0096b9 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 1746113a6b1..ec472c800e1 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