summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenvprogram.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-08 17:58:54 -0600
committerBrian Paul <[email protected]>2009-04-01 20:20:03 -0600
commitbd9b2be8284fda3f8aac235908ded118b5648a38 (patch)
tree0187557ccb00a3ff7785b2cb8beeb7aaf217419f /src/mesa/main/texenvprogram.c
parenta35ad020f9449849f7616788aa6bd9e439d6c518 (diff)
mesa: texture combine clean-ups
Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
Diffstat (limited to 'src/mesa/main/texenvprogram.c')
-rw-r--r--src/mesa/main/texenvprogram.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 3fbd119b347..4a124bf27e2 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -39,9 +39,6 @@
#include "texenvprogram.h"
-#define MAX_TERMS 4
-
-
/*
* Note on texture units:
*
@@ -95,11 +92,11 @@ struct state_key {
GLuint NumArgsRGB:3;
GLuint ModeRGB:5;
- struct mode_opt OptRGB[MAX_TERMS];
+ struct mode_opt OptRGB[MAX_COMBINER_TERMS];
GLuint NumArgsA:3;
GLuint ModeA:5;
- struct mode_opt OptA[MAX_TERMS];
+ struct mode_opt OptA[MAX_COMBINER_TERMS];
} unit[8];
};
@@ -389,7 +386,7 @@ static void make_state_key( GLcontext *ctx, struct state_key *key )
key->unit[i].ScaleShiftRGB = texUnit->_CurrentCombine->ScaleShiftRGB;
key->unit[i].ScaleShiftA = texUnit->_CurrentCombine->ScaleShiftA;
- for (j = 0; j < MAX_TERMS; j++) {
+ for (j = 0; j < MAX_COMBINER_TERMS; j++) {
key->unit[i].OptRGB[j].Operand =
translate_operand(texUnit->_CurrentCombine->OperandRGB[j]);
key->unit[i].OptA[j].Operand =
@@ -972,11 +969,11 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
GLuint mode,
const struct mode_opt *opt)
{
- struct ureg src[MAX_TERMS];
+ struct ureg src[MAX_COMBINER_TERMS];
struct ureg tmp, half;
GLuint i;
- assert(nr <= MAX_TERMS);
+ assert(nr <= MAX_COMBINER_TERMS);
tmp = undef; /* silence warning (bug 5318) */