summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-07-22 11:25:26 +0100
committerKeith Whitwell <keithw@vmware.com>2009-07-23 14:38:26 +0100
commit78379abcbf853b2cff8d832b45ecf0eeb54b2c58 (patch)
tree2345a999acd92f9c52d9d460e79e37299e3cb2f9
parent8b78294d21ffb2cba41328341457bf193087d969 (diff)
gallium: remove deprecated TGSI opcodes
Various opcodes which can be implemented trivially with other TGSI opcodes, such as matrix multiplication and negation. These were not used by any state tracker or implemented by any of the drivers.
-rw-r--r--src/gallium/auxiliary/gallivm/tgsitollvm.cpp26
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c15
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c14
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sse2.c12
-rw-r--r--src/gallium/drivers/cell/spu/spu_exec.c12
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h8
6 files changed, 7 insertions, 80 deletions
diff --git a/src/gallium/auxiliary/gallivm/tgsitollvm.cpp b/src/gallium/auxiliary/gallivm/tgsitollvm.cpp
index 9c8f89d520..71f79ef5f5 100644
--- a/src/gallium/auxiliary/gallivm/tgsitollvm.cpp
+++ b/src/gallium/auxiliary/gallivm/tgsitollvm.cpp
@@ -354,12 +354,6 @@ translate_instruction(llvm::Module *module,
out = instr->dot2add(inputs[0], inputs[1], inputs[2]);
}
break;
- case TGSI_OPCODE_INDEX:
- break;
- case TGSI_OPCODE_NEGATE: {
- out = instr->neg(inputs[0]);
- }
- break;
case TGSI_OPCODE_FRAC: {
out = instr->frc(inputs[0]);
}
@@ -390,8 +384,6 @@ translate_instruction(llvm::Module *module,
out = instr->cross(inputs[0], inputs[1]);
}
break;
- case TGSI_OPCODE_MULTIPLYMATRIX:
- break;
case TGSI_OPCODE_ABS: {
out = instr->abs(inputs[0]);
}
@@ -619,14 +611,6 @@ translate_instruction(llvm::Module *module,
break;
case TGSI_OPCODE_NOP:
break;
- case TGSI_OPCODE_M4X3:
- break;
- case TGSI_OPCODE_M3X4:
- break;
- case TGSI_OPCODE_M3X3:
- break;
- case TGSI_OPCODE_M3X2:
- break;
case TGSI_OPCODE_CALLNZ:
break;
case TGSI_OPCODE_IFC:
@@ -816,8 +800,6 @@ translate_instructionir(llvm::Module *module,
case TGSI_OPCODE_CROSSPRODUCT: {
}
break;
- case TGSI_OPCODE_MULTIPLYMATRIX:
- break;
case TGSI_OPCODE_ABS: {
out = instr->abs(inputs[0]);
}
@@ -985,14 +967,6 @@ translate_instructionir(llvm::Module *module,
break;
case TGSI_OPCODE_NOP:
break;
- case TGSI_OPCODE_M4X3:
- break;
- case TGSI_OPCODE_M3X4:
- break;
- case TGSI_OPCODE_M3X3:
- break;
- case TGSI_OPCODE_M3X2:
- break;
case TGSI_OPCODE_NRM4:
break;
case TGSI_OPCODE_CALLNZ:
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index b193fd7a0a..0179bba5a2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -2341,16 +2341,6 @@ exec_instruction(
}
break;
- case TGSI_OPCODE_INDEX:
- /* XXX: considered for removal */
- assert (0);
- break;
-
- case TGSI_OPCODE_NEGATE:
- /* XXX: considered for removal */
- assert (0);
- break;
-
case TGSI_OPCODE_FRC:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH( &r[0], 0, chan_index );
@@ -2454,11 +2444,6 @@ exec_instruction(
}
break;
- case TGSI_OPCODE_MULTIPLYMATRIX:
- /* XXX: considered for removal */
- assert (0);
- break;
-
case TGSI_OPCODE_ABS:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[0], 0, chan_index);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 29b8115560..fedda7bff9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -53,8 +53,8 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 1, 3, 0, 0, "CND", TGSI_OPCODE_CND },
{ 1, 3, 0, 0, "CND0", TGSI_OPCODE_CND0 },
{ 1, 3, 0, 0, "DP2A", TGSI_OPCODE_DP2A },
- { 1, 2, 0, 0, "INDEX", TGSI_OPCODE_INDEX },
- { 1, 1, 0, 0, "NEGATE", TGSI_OPCODE_NEGATE },
+ { 0, 0, 0, 0, "", 22 }, /* removed */
+ { 0, 0, 0, 0, "", 23 }, /* removed */
{ 1, 1, 0, 0, "FRC", TGSI_OPCODE_FRC },
{ 1, 3, 0, 0, "CLAMP", TGSI_OPCODE_CLAMP },
{ 1, 1, 0, 0, "FLR", TGSI_OPCODE_FLR },
@@ -63,7 +63,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 1, 1, 0, 0, "LG2", TGSI_OPCODE_LG2 },
{ 1, 2, 0, 0, "POW", TGSI_OPCODE_POW },
{ 1, 2, 0, 0, "XPD", TGSI_OPCODE_XPD },
- { 1, 2, 0, 0, "M4X4", TGSI_OPCODE_MULTIPLYMATRIX },
+ { 0, 0, 0, 0, "", 32 }, /* removed */
{ 1, 1, 0, 0, "ABS", TGSI_OPCODE_ABS },
{ 1, 1, 0, 0, "RCC", TGSI_OPCODE_RCC },
{ 1, 2, 0, 0, "DPH", TGSI_OPCODE_DPH },
@@ -139,10 +139,10 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 1, 1, 0, 0, "NOISE3", TGSI_OPCODE_NOISE3 },
{ 1, 1, 0, 0, "NOISE4", TGSI_OPCODE_NOISE4 },
{ 0, 0, 0, 0, "NOP", TGSI_OPCODE_NOP },
- { 1, 2, 0, 0, "M4X3", TGSI_OPCODE_M4X3 },
- { 1, 2, 0, 0, "M3X4", TGSI_OPCODE_M3X4 },
- { 1, 2, 0, 0, "M3X3", TGSI_OPCODE_M3X3 },
- { 1, 2, 0, 0, "M3X2", TGSI_OPCODE_M3X2 },
+ { 0, 0, 0, 0, "", 108 }, /* removed */
+ { 0, 0, 0, 0, "", 109 }, /* removed */
+ { 0, 0, 0, 0, "", 110 }, /* removed */
+ { 0, 0, 0, 0, "", 111 }, /* removed */
{ 1, 1, 0, 0, "NRM4", TGSI_OPCODE_NRM4 },
{ 0, 1, 0, 0, "CALLNZ", TGSI_OPCODE_CALLNZ },
{ 0, 1, 0, 0, "IFC", TGSI_OPCODE_IFC },
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index a2d4627da9..781ea1e75c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -2099,14 +2099,6 @@ emit_instruction(
}
break;
- case TGSI_OPCODE_INDEX:
- return 0;
- break;
-
- case TGSI_OPCODE_NEGATE:
- return 0;
- break;
-
case TGSI_OPCODE_FRC:
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH( func, *inst, 0, 0, chan_index );
@@ -2206,10 +2198,6 @@ emit_instruction(
}
break;
- case TGSI_OPCODE_MULTIPLYMATRIX:
- return 0;
- break;
-
case TGSI_OPCODE_ABS:
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH( func, *inst, 0, 0, chan_index );
diff --git a/src/gallium/drivers/cell/spu/spu_exec.c b/src/gallium/drivers/cell/spu/spu_exec.c
index 6655842d59..570553e1d6 100644
--- a/src/gallium/drivers/cell/spu/spu_exec.c
+++ b/src/gallium/drivers/cell/spu/spu_exec.c
@@ -1158,14 +1158,6 @@ exec_instruction(
ASSERT (0);
break;
- case TGSI_OPCODE_INDEX:
- ASSERT (0);
- break;
-
- case TGSI_OPCODE_NEGATE:
- ASSERT (0);
- break;
-
case TGSI_OPCODE_FRC:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH( &r[0], 0, chan_index );
@@ -1265,10 +1257,6 @@ exec_instruction(
}
break;
- case TGSI_OPCODE_MULTIPLYMATRIX:
- ASSERT (0);
- break;
-
case TGSI_OPCODE_ABS:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[0], 0, chan_index);
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 3dfc914269..89948d2d8e 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -192,8 +192,6 @@ union tgsi_immediate_data
/*
* GL_EXT_vertex_shader
*/
-#define TGSI_OPCODE_INDEX 22 /* considered for removal */
-#define TGSI_OPCODE_NEGATE 23 /* considered for removal */
/*#define TGSI_OPCODE_MADD TGSI_OPCODE_MAD*/
#define TGSI_OPCODE_FRC 24
/*#define TGSI_OPCODE_SETGE TGSI_OPCODE_SGE*/
@@ -207,7 +205,6 @@ union tgsi_immediate_data
/*#define TGSI_OPCODE_RECIP TGSI_OPCODE_RCP*/
/*#define TGSI_OPCODE_RECIPSQRT TGSI_OPCODE_RSQ*/
#define TGSI_OPCODE_XPD 31
-#define TGSI_OPCODE_MULTIPLYMATRIX 32 /* considered for removal */
/*
* GL_NV_vertex_program1_1
@@ -378,11 +375,6 @@ union tgsi_immediate_data
/*
* ps_2_0
*/
-/*#define TGSI_OPCODE_M4X4 TGSI_OPCODE_MULTIPLYMATRIX*/
-#define TGSI_OPCODE_M4X3 108
-#define TGSI_OPCODE_M3X4 109
-#define TGSI_OPCODE_M3X3 110
-#define TGSI_OPCODE_M3X2 111
/*#define TGSI_OPCODE_CRS TGSI_OPCODE_XPD*/
#define TGSI_OPCODE_NRM4 112
/*#define TGSI_OPCODE_SINCOS TGSI_OPCODE_SCS*/