diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-01 15:57:36 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-01 17:39:31 -0600 |
commit | 9ed0315271c38f5fe9cdd65020a54cbb7f61ed2b (patch) | |
tree | 80621dc4c004e4289318f512d112c213a6df499f | |
parent | b5ec0a68589c5d8f0d4be2556ea6d6b01fd4e37d (diff) |
mesa: more comments, clean-ups
-rw-r--r-- | src/mesa/main/texenvprogram.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index ea0aa448e1..54960a1fa1 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -92,21 +92,21 @@ struct state_key { GLuint enabled_units:8; GLuint separate_specular:1; GLuint fog_enabled:1; - GLuint fog_mode:2; + GLuint fog_mode:2; /**< FOG_x */ GLuint inputs_available:12; struct { GLuint enabled:1; - GLuint source_index:3; /* one of TEXTURE_1D/2D/3D/CUBE/RECT_INDEX */ + GLuint source_index:3; /**< TEXTURE_x_INDEX */ GLuint shadow:1; GLuint ScaleShiftRGB:2; GLuint ScaleShiftA:2; - GLuint NumArgsRGB:3; + GLuint NumArgsRGB:3; /**< up to MAX_COMBINER_TERMS */ GLuint ModeRGB:5; /**< MODE_x */ struct mode_opt OptRGB[MAX_COMBINER_TERMS]; - GLuint NumArgsA:3; + GLuint NumArgsA:3; /**< up to MAX_COMBINER_TERMS */ GLuint ModeA:5; /**< MODE_x */ struct mode_opt OptA[MAX_COMBINER_TERMS]; } unit[MAX_TEXTURE_UNITS]; @@ -705,7 +705,7 @@ emit_op(struct texenv_fragment_program *p, struct ureg src1, struct ureg src2 ) { - GLuint nr = p->program->Base.NumInstructions++; + const GLuint nr = p->program->Base.NumInstructions++; struct prog_instruction *inst = &p->program->Base.Instructions[nr]; assert(nr < MAX_INSTRUCTIONS); @@ -950,15 +950,15 @@ static struct ureg emit_combine_source( struct texenv_fragment_program *p, */ static GLboolean args_match( const struct state_key *key, GLuint unit ) { - GLuint i, nr = key->unit[unit].NumArgsRGB; + GLuint i, numArgs = key->unit[unit].NumArgsRGB; - for (i = 0 ; i < nr ; i++) { + for (i = 0 ; i < numArgs ; i++) { if (key->unit[unit].OptA[i].Source != key->unit[unit].OptRGB[i].Source) return GL_FALSE; - switch(key->unit[unit].OptA[i].Operand) { + switch (key->unit[unit].OptA[i].Operand) { case OPR_SRC_ALPHA: - switch(key->unit[unit].OptRGB[i].Operand) { + switch (key->unit[unit].OptRGB[i].Operand) { case OPR_SRC_COLOR: case OPR_SRC_ALPHA: break; @@ -967,7 +967,7 @@ static GLboolean args_match( const struct state_key *key, GLuint unit ) } break; case OPR_ONE_MINUS_SRC_ALPHA: - switch(key->unit[unit].OptRGB[i].Operand) { + switch (key->unit[unit].OptRGB[i].Operand) { case OPR_ONE_MINUS_SRC_COLOR: case OPR_ONE_MINUS_SRC_ALPHA: break; |