clean-up
This commit is contained in:
@@ -36,7 +36,6 @@
|
|||||||
#include "st_atom.h"
|
#include "st_atom.h"
|
||||||
#include "st_cb_texture.h"
|
#include "st_cb_texture.h"
|
||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
#include "pipe/p_defines.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,18 +45,14 @@
|
|||||||
static void
|
static void
|
||||||
update_textures(struct st_context *st)
|
update_textures(struct st_context *st)
|
||||||
{
|
{
|
||||||
GLuint s;
|
|
||||||
|
|
||||||
/* ST_NEW_FRAGMENT_PROGRAM
|
/* ST_NEW_FRAGMENT_PROGRAM
|
||||||
*/
|
*/
|
||||||
struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
|
struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
|
||||||
|
GLuint unit;
|
||||||
|
|
||||||
for (s = 0; s < st->ctx->Const.MaxTextureCoordUnits; s++) {
|
for (unit = 0; unit < st->ctx->Const.MaxTextureCoordUnits; unit++) {
|
||||||
GLuint su = fprog->Base.SamplerUnits[s];
|
const GLuint su = fprog->Base.SamplerUnits[unit];
|
||||||
|
struct gl_texture_object *texObj = st->ctx->Texture.Unit[su]._Current;
|
||||||
struct gl_texture_object *texObj
|
|
||||||
= st->ctx->Texture.Unit[su]._Current;
|
|
||||||
|
|
||||||
struct pipe_texture *pt;
|
struct pipe_texture *pt;
|
||||||
|
|
||||||
if (texObj) {
|
if (texObj) {
|
||||||
@@ -75,9 +70,9 @@ update_textures(struct st_context *st)
|
|||||||
* this table before being deleted, otherwise the pointer
|
* this table before being deleted, otherwise the pointer
|
||||||
* comparison below could fail.
|
* comparison below could fail.
|
||||||
*/
|
*/
|
||||||
if (st->state.sampler_texture[s] != pt) {
|
if (st->state.sampler_texture[unit] != pt) {
|
||||||
st->state.sampler_texture[s] = pt;
|
st->state.sampler_texture[unit] = pt;
|
||||||
st->pipe->set_sampler_texture(st->pipe, s, pt);
|
st->pipe->set_sampler_texture(st->pipe, unit, pt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user