mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
r500_fragprog: Cleanup some unused variables and code.
This commit is contained in:
parent
13c44679ad
commit
85b46fbe9c
2 changed files with 1 additions and 46 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -89,27 +89,6 @@ struct reg_lifetime {
|
|||
int scalar_lastread;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue