summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2008-07-05 10:58:54 +0200
committerNicolai Haehnle <[email protected]>2008-07-05 18:04:10 +0200
commit85b46fbe9cfc8de8871d6adb0b2287c5837d3028 (patch)
treeace5901bf1301c908628752ef196c7bc156b15a6 /src
parent13c44679ad42886544036f49597dcfc0d4b7e925 (diff)
r500_fragprog: Cleanup some unused variables and code.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c5
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog_emit.c42
2 files changed, 1 insertions, 46 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 41cb7c6ffcf..fd9769d653d 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -27,11 +27,6 @@
#include "r500_fragprog.h"
-static void reset_srcreg(struct prog_src_register* reg)
-{
- _mesa_bzero(reg, sizeof(*reg));
- reg->Swizzle = SWIZZLE_NOOP;
-}
/**
* Transform TEX, TXP, TXB, and KIL instructions in the following way:
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
index 2266dc3dece..19a5cef0843 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
@@ -90,27 +90,6 @@ struct reg_lifetime {
};
/**
- * Store usage information about an ALU instruction slot during the
- * compilation of a fragment program.
- */
-#define SLOT_SRC_VECTOR (1<<0)
-#define SLOT_SRC_SCALAR (1<<3)
-#define SLOT_SRC_BOTH (SLOT_SRC_VECTOR | SLOT_SRC_SCALAR)
-#define SLOT_OP_VECTOR (1<<16)
-#define SLOT_OP_SCALAR (1<<17)
-#define SLOT_OP_BOTH (SLOT_OP_VECTOR | SLOT_OP_SCALAR)
-
-struct r500_pfs_compile_slot {
- /* Bitmask indicating which parts of the slot are used, using SLOT_ constants
- defined above */
- unsigned int used;
-
- /* Selected sources */
- int vsrc[3];
- int ssrc[3];
-};
-
-/**
* Store information during compilation of fragment programs.
*/
struct r500_pfs_compile_state {
@@ -119,21 +98,9 @@ struct r500_pfs_compile_state {
/* number of ALU slots used so far */
int nrslots;
- /* Track which (parts of) slots are already filled with instructions */
- struct r500_pfs_compile_slot slot[PFS_MAX_ALU_INST];
-
- /* Track the validity of R300 temporaries */
- struct reg_lifetime hwtemps[PFS_NUM_TEMP_REGS];
-
/* Used to map Mesa's inputs/temps onto hardware temps */
int temp_in_use;
- struct reg_acc temps[PFS_NUM_TEMP_REGS];
struct reg_acc inputs[32]; /* don't actually need 32... */
-
- /* Track usage of hardware temps, for register allocation,
- * indirection detection, etc. */
- GLuint used_in_node;
- GLuint dest_in_node;
};
/*
@@ -1328,7 +1295,7 @@ static void init_program(struct r500_pfs_compile_state *cs)
struct prog_instruction *fpi;
GLuint InputsRead = mp->Base.InputsRead;
GLuint temps_used = 0;
- int i, j;
+ int i;
/* New compile, reset tracking data */
cs->compiler->fp->optimization =
@@ -1343,13 +1310,6 @@ static void init_program(struct r500_pfs_compile_state *cs)
/* Whether or not we perform any depth writing. */
cs->compiler->fp->writes_depth = GL_FALSE;
- for (i = 0; i < PFS_MAX_ALU_INST; i++) {
- for (j = 0; j < 3; j++) {
- cs->slot[i].vsrc[j] = SRC_CONST;
- cs->slot[i].ssrc[j] = SRC_CONST;
- }
- }
-
/* Work out what temps the Mesa inputs correspond to, this must match
* what setup_rs_unit does, which shouldn't be a problem as rs_unit
* configures itself based on the fragprog's InputsRead