summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-05 17:46:31 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-06 09:35:38 -0700
commit71984d76aae937274f6dd08c24f995d3c0c06357 (patch)
treeb2aeff521eca020c7bade1d1dcb79e74c88da0f0 /src/mesa/state_tracker
parent4650b35846e8e87fb0d74573a5f66452bb449b4b (diff)
clean-up
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index fb21d29c40..b3859f18cb 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -36,7 +36,6 @@
#include "st_atom.h"
#include "st_cb_texture.h"
#include "pipe/p_context.h"
-#include "pipe/p_defines.h"
/**
@@ -46,18 +45,14 @@
static void
update_textures(struct st_context *st)
{
- GLuint s;
-
/* ST_NEW_FRAGMENT_PROGRAM
*/
struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
+ GLuint unit;
- for (s = 0; s < st->ctx->Const.MaxTextureCoordUnits; s++) {
- GLuint su = fprog->Base.SamplerUnits[s];
-
- struct gl_texture_object *texObj
- = st->ctx->Texture.Unit[su]._Current;
-
+ for (unit = 0; unit < st->ctx->Const.MaxTextureCoordUnits; unit++) {
+ const GLuint su = fprog->Base.SamplerUnits[unit];
+ struct gl_texture_object *texObj = st->ctx->Texture.Unit[su]._Current;
struct pipe_texture *pt;
if (texObj) {
@@ -75,9 +70,9 @@ update_textures(struct st_context *st)
* this table before being deleted, otherwise the pointer
* comparison below could fail.
*/
- if (st->state.sampler_texture[s] != pt) {
- st->state.sampler_texture[s] = pt;
- st->pipe->set_sampler_texture(st->pipe, s, pt);
+ if (st->state.sampler_texture[unit] != pt) {
+ st->state.sampler_texture[unit] = pt;
+ st->pipe->set_sampler_texture(st->pipe, unit, pt);
}
}
}