aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texcombine.c
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/swrast/s_texcombine.c
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/swrast/s_texcombine.c')
-rw-r--r--src/mesa/swrast/s_texcombine.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 0c8cc9ff37b..7f49b6ffa50 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -631,9 +631,9 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
/* adjust texture lod (lambda) */
if (span->arrayMask & SPAN_LAMBDA) {
- if (texUnit->LodBias + curObj->LodBias != 0.0F) {
+ if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) {
/* apply LOD bias, but don't clamp yet */
- const GLfloat bias = CLAMP(texUnit->LodBias + curObj->LodBias,
+ const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias,
-ctx->Const.MaxTextureLodBias,
ctx->Const.MaxTextureLodBias);
GLuint i;
@@ -642,10 +642,11 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
}
}
- if (curObj->MinLod != -1000.0 || curObj->MaxLod != 1000.0) {
+ if (curObj->Sampler.MinLod != -1000.0 ||
+ curObj->Sampler.MaxLod != 1000.0) {
/* apply LOD clamping to lambda */
- const GLfloat min = curObj->MinLod;
- const GLfloat max = curObj->MaxLod;
+ const GLfloat min = curObj->Sampler.MinLod;
+ const GLfloat max = curObj->Sampler.MaxLod;
GLuint i;
for (i = 0; i < span->end; i++) {
GLfloat l = lambda[i];
@@ -686,9 +687,9 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
/* adjust texture lod (lambda) */
if (span->arrayMask & SPAN_LAMBDA) {
- if (texUnit->LodBias + curObj->LodBias != 0.0F) {
+ if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) {
/* apply LOD bias, but don't clamp yet */
- const GLfloat bias = CLAMP(texUnit->LodBias + curObj->LodBias,
+ const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias,
-ctx->Const.MaxTextureLodBias,
ctx->Const.MaxTextureLodBias);
GLuint i;
@@ -697,10 +698,11 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
}
}
- if (curObj->MinLod != -1000.0 || curObj->MaxLod != 1000.0) {
+ if (curObj->Sampler.MinLod != -1000.0 ||
+ curObj->Sampler.MaxLod != 1000.0) {
/* apply LOD clamping to lambda */
- const GLfloat min = curObj->MinLod;
- const GLfloat max = curObj->MaxLod;
+ const GLfloat min = curObj->Sampler.MinLod;
+ const GLfloat max = curObj->Sampler.MaxLod;
GLuint i;
for (i = 0; i < span->end; i++) {
GLfloat l = lambda[i];