summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-04-10 12:44:46 -0600
committerBrian Paul <[email protected]>2011-04-10 13:12:49 -0600
commitecfaab88b2577bd0395bc05d75a036126806a9c4 (patch)
tree5abb78f767f546778d551a57f7f2cfe20c479f50 /src/mesa/drivers/dri/savage
parent1cbd3a1cc734df16610a59dc49cdb42c70dc3270 (diff)
mesa: move sampler state into new gl_sampler_object type
gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
Diffstat (limited to 'src/mesa/drivers/dri/savage')
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c12
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index 8cc448ad4f7..6687dc5f466 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -250,9 +250,9 @@ static GLboolean run_texnorm_stage( struct gl_context *ctx,
const GLbitfield reallyEnabled = ctx->Texture.Unit[i]._ReallyEnabled;
if (reallyEnabled) {
const struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
- const GLboolean normalizeS = (texObj->WrapS == GL_REPEAT);
+ const GLboolean normalizeS = (texObj->Sampler.WrapS == GL_REPEAT);
const GLboolean normalizeT = (reallyEnabled & TEXTURE_2D_BIT) &&
- (texObj->WrapT == GL_REPEAT);
+ (texObj->Sampler.WrapT == GL_REPEAT);
const GLfloat *in = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->data;
const GLint instride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->stride;
GLfloat (*out)[4] = store->texcoord[i].data;
@@ -332,15 +332,15 @@ static void validate_texnorm( struct gl_context *ctx,
GLuint flags = 0;
if (((ctx->Texture.Unit[0]._ReallyEnabled & (TEXTURE_1D_BIT|TEXTURE_2D_BIT)) &&
- (ctx->Texture.Unit[0]._Current->WrapS == GL_REPEAT)) ||
+ (ctx->Texture.Unit[0]._Current->Sampler.WrapS == GL_REPEAT)) ||
((ctx->Texture.Unit[0]._ReallyEnabled & TEXTURE_2D_BIT) &&
- (ctx->Texture.Unit[0]._Current->WrapT == GL_REPEAT)))
+ (ctx->Texture.Unit[0]._Current->Sampler.WrapT == GL_REPEAT)))
flags |= VERT_BIT_TEX0;
if (((ctx->Texture.Unit[1]._ReallyEnabled & (TEXTURE_1D_BIT|TEXTURE_2D_BIT)) &&
- (ctx->Texture.Unit[1]._Current->WrapS == GL_REPEAT)) ||
+ (ctx->Texture.Unit[1]._Current->Sampler.WrapS == GL_REPEAT)) ||
((ctx->Texture.Unit[1]._ReallyEnabled & TEXTURE_2D_BIT) &&
- (ctx->Texture.Unit[1]._Current->WrapT == GL_REPEAT)))
+ (ctx->Texture.Unit[1]._Current->Sampler.WrapT == GL_REPEAT)))
flags |= VERT_BIT_TEX1;
store->active = (flags != 0);
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index 3aece732c99..9486c12c158 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -502,9 +502,9 @@ savageAllocTexObj( struct gl_texture_object *texObj )
make_empty_list( &t->base );
- savageSetTexWrapping(t,texObj->WrapS,texObj->WrapT);
- savageSetTexFilter(t,texObj->MinFilter,texObj->MagFilter);
- savageSetTexBorderColor(t,texObj->BorderColor.f);
+ savageSetTexWrapping(t,texObj->Sampler.WrapS,texObj->Sampler.WrapT);
+ savageSetTexFilter(t,texObj->Sampler.MinFilter,texObj->Sampler.MagFilter);
+ savageSetTexBorderColor(t,texObj->Sampler.BorderColor.f);
}
return t;
@@ -2031,16 +2031,16 @@ static void savageTexParameter( struct gl_context *ctx, GLenum target,
switch (pname) {
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
- savageSetTexFilter(t,tObj->MinFilter,tObj->MagFilter);
+ savageSetTexFilter(t,tObj->Sampler.MinFilter,tObj->Sampler.MagFilter);
break;
case GL_TEXTURE_WRAP_S:
case GL_TEXTURE_WRAP_T:
- savageSetTexWrapping(t,tObj->WrapS,tObj->WrapT);
+ savageSetTexWrapping(t,tObj->Sampler.WrapS,tObj->Sampler.WrapT);
break;
case GL_TEXTURE_BORDER_COLOR:
- savageSetTexBorderColor(t,tObj->BorderColor.f);
+ savageSetTexBorderColor(t,tObj->Sampler.BorderColor.f);
break;
default: