summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-11-12 13:13:59 -0800
committerEric Anholt <[email protected]>2014-11-24 14:56:22 -0800
commitd4864cdf15ccd30f0e82d07fd0e9db8a0c115cda (patch)
treefddfda125d068bb4b451ca411fe9fc6b130a9d62 /src/gallium/auxiliary/tgsi/tgsi_exec.c
parent7361d5ba63dda35683569e76caa33f886304958f (diff)
gallium: Drop the NRM and NRM4 opcodes.
They weren't generated in tree, and as far as I know all hardware had to lower it to a DP, RSQ, MUL. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 77948011ac7..b9a4c7bf88c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -2773,70 +2773,6 @@ exec_dp2(struct tgsi_exec_machine *mach,
}
static void
-exec_nrm4(struct tgsi_exec_machine *mach,
- const struct tgsi_full_instruction *inst)
-{
- unsigned int chan;
- union tgsi_exec_channel arg[4];
- union tgsi_exec_channel scale;
-
- fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
- micro_mul(&scale, &arg[0], &arg[0]);
-
- for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_W; chan++) {
- union tgsi_exec_channel product;
-
- fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
- micro_mul(&product, &arg[chan], &arg[chan]);
- micro_add(&scale, &scale, &product);
- }
-
- micro_rsq(&scale, &scale);
-
- for (chan = TGSI_CHAN_X; chan <= TGSI_CHAN_W; chan++) {
- if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
- micro_mul(&arg[chan], &arg[chan], &scale);
- store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
- }
- }
-}
-
-static void
-exec_nrm3(struct tgsi_exec_machine *mach,
- const struct tgsi_full_instruction *inst)
-{
- if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XYZ) {
- unsigned int chan;
- union tgsi_exec_channel arg[3];
- union tgsi_exec_channel scale;
-
- fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
- micro_mul(&scale, &arg[0], &arg[0]);
-
- for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_Z; chan++) {
- union tgsi_exec_channel product;
-
- fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
- micro_mul(&product, &arg[chan], &arg[chan]);
- micro_add(&scale, &scale, &product);
- }
-
- micro_rsq(&scale, &scale);
-
- for (chan = TGSI_CHAN_X; chan <= TGSI_CHAN_Z; chan++) {
- if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
- micro_mul(&arg[chan], &arg[chan], &scale);
- store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
- }
- }
- }
-
- if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
- store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
- }
-}
-
-static void
exec_scs(struct tgsi_exec_machine *mach,
const struct tgsi_full_instruction *inst)
{
@@ -4104,14 +4040,6 @@ exec_instruction(
exec_scs(mach, inst);
break;
- case TGSI_OPCODE_NRM:
- exec_nrm3(mach, inst);
- break;
-
- case TGSI_OPCODE_NRM4:
- exec_nrm4(mach, inst);
- break;
-
case TGSI_OPCODE_DIV:
exec_vector_binary(mach, inst, micro_div, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
break;