summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-10-23 13:49:04 +0100
committerKeith Whitwell <keithw@vmware.com>2009-10-23 13:56:07 +0100
commit4e1d51786e0657c7430d731ac464f2a73e32eddf (patch)
tree60465f314eae992df47c097e9cffd5fe7ec6ef99 /src/mesa
parent19403935aa4782227a1199cb0355f4bc6c0d02db (diff)
gallium: remove noise opcodes
Provide a dummy implementation in the GL state tracker (move 0.5 to the destination regs). At some point, a motivated person could add a better implementation of noise. Currently not even the nvidia binary drivers do anything more than this. In any case, the place to do this is in the GL state tracker, not the poor driver.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 70d7c4fee2..1b9d35d353 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -481,14 +481,6 @@ translate_opcode( unsigned op )
return TGSI_OPCODE_MOV;
case OPCODE_MUL:
return TGSI_OPCODE_MUL;
- case OPCODE_NOISE1:
- return TGSI_OPCODE_NOISE1;
- case OPCODE_NOISE2:
- return TGSI_OPCODE_NOISE2;
- case OPCODE_NOISE3:
- return TGSI_OPCODE_NOISE3;
- case OPCODE_NOISE4:
- return TGSI_OPCODE_NOISE4;
case OPCODE_NOP:
return TGSI_OPCODE_NOP;
case OPCODE_NRM3:
@@ -616,6 +608,21 @@ compile_instruction(
src, num_src );
break;
+ case OPCODE_NOISE1:
+ case OPCODE_NOISE2:
+ case OPCODE_NOISE3:
+ case OPCODE_NOISE4:
+ /* At some point, a motivated person could add a better
+ * implementation of noise. Currently not even the nvidia
+ * binary drivers do anything more than this. In any case, the
+ * place to do this is in the GL state tracker, not the poor
+ * driver.
+ */
+ ureg_MOV( ureg, dst[0], ureg_imm1f(ureg, 0.5) );
+ break;
+
+
+
default:
ureg_insn( ureg,
translate_opcode( inst->Opcode ),