summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r600
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-04-11 13:26:42 -0600
committerBrian Paul <[email protected]>2011-04-11 13:26:42 -0600
commit65b024d63a44464ecf752bec417281109f4bd81e (patch)
tree570081b38d5c5a31fc876abf73922d600b7a9534 /src/mesa/drivers/dri/r600
parentda8d0c965cc71058b570b7e34ba9c03639173da7 (diff)
mesa: fixup r600 DRI driver for sampler object changes
Diffstat (limited to 'src/mesa/drivers/dri/r600')
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_tex.c24
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c12
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c12
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c4
4 files changed, 26 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.c b/src/mesa/drivers/dri/r600/evergreen_tex.c
index 5fdb91a63d1..810f0e8b523 100644
--- a/src/mesa/drivers/dri/r600/evergreen_tex.c
+++ b/src/mesa/drivers/dri/r600/evergreen_tex.c
@@ -581,7 +581,7 @@ static GLboolean evergreenGetTexFormat(struct gl_texture_object *tObj, gl_format
default:
break;
};
- switch (tObj->DepthMode) {
+ switch (tObj->Sampler.DepthMode) {
case GL_LUMINANCE: /* X, X, X, ONE */
SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
@@ -901,7 +901,7 @@ static void evergreenSetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, G
}
}
-static void evergreenSetTexSampler.BorderColor(radeonTexObjPtr t, const GLfloat color[4])
+static void evergreenSetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
{
t->TD_PS_SAMPLER0_BORDER_ALPHA = *((uint32_t*)&(color[3]));
t->TD_PS_SAMPLER0_BORDER_RED = *((uint32_t*)&(color[2]));
@@ -1022,21 +1022,21 @@ static GLboolean evergreen_setup_hardware_state(struct gl_context * ctx, struct
SETfield(t->SQ_TEX_RESOURCE5, t->maxLod - t->minLod, LAST_LEVEL_shift, LAST_LEVEL_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- EG_S_FIXED(CLAMP(t->base.MinLod - t->minLod, 0, 15), 8),
+ EG_S_FIXED(CLAMP(t->base.Sampler.MinLod - t->minLod, 0, 15), 8),
EG_SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_shift,
EG_SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- EG_S_FIXED(CLAMP(t->base.MaxLod - t->minLod, 0, 15), 8),
+ EG_S_FIXED(CLAMP(t->base.Sampler.MaxLod - t->minLod, 0, 15), 8),
EG_SQ_TEX_SAMPLER_WORD1_0__MAX_LOD_shift,
EG_SQ_TEX_SAMPLER_WORD1_0__MAX_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER2,
- EG_S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.LodBias, -16, 16), 8),
+ EG_S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.Sampler.LodBias, -16, 16), 8),
EG_SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_shift,
EG_SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_mask);
- if(texObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
+ if(texObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
{
- SETfield(t->SQ_TEX_SAMPLER0, evergreen_translate_shadow_func(texObj->CompareFunc),
+ SETfield(t->SQ_TEX_SAMPLER0, evergreen_translate_shadow_func(texObj->Sampler.CompareFunc),
EG_SQ_TEX_SAMPLER_WORD0_0__DCF_shift,
EG_SQ_TEX_SAMPLER_WORD0_0__DCF_mask);
}
@@ -1420,12 +1420,12 @@ static struct gl_texture_object *evergreenNewTextureObject(struct gl_context * c
t, _mesa_lookup_enum_by_nr(target));
_mesa_initialize_texture_object(&t->base, name, target);
- t->base.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
+ t->base.Sampler.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
evergreenSetTexDefaultState(t);
evergreenUpdateTexWrap(t);
- evergreenSetTexFilter(t, t->base.Sampler.MinFilter, t->base.Sampler.MagFilter, t->base.MaxAnisotropy);
- evergreenSetTexSampler.BorderColor(t, t->base.Sampler.BorderColor.f);
+ evergreenSetTexFilter(t, t->base.Sampler.MinFilter, t->base.Sampler.MagFilter, t->base.Sampler.MaxAnisotropy);
+ evergreenSetTexBorderColor(t, t->base.Sampler.BorderColor.f);
return &t->base;
}
@@ -1475,7 +1475,7 @@ static void evergreenTexParameter(struct gl_context * ctx, GLenum target,
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
- evergreenSetTexFilter(t, texObj->Sampler.MinFilter, texObj->Sampler.MagFilter, texObj->MaxAnisotropy);
+ evergreenSetTexFilter(t, texObj->Sampler.MinFilter, texObj->Sampler.MagFilter, texObj->Sampler.MaxAnisotropy);
break;
case GL_TEXTURE_WRAP_S:
@@ -1485,7 +1485,7 @@ static void evergreenTexParameter(struct gl_context * ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- evergreenSetTexSampler.BorderColor(t, texObj->Sampler.BorderColor.f);
+ evergreenSetTexBorderColor(t, texObj->Sampler.BorderColor.f);
break;
case GL_TEXTURE_BASE_LEVEL:
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index 07f6de7ad49..eb7ed30c7a3 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -262,7 +262,7 @@ static void r600SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
}
}
-static void r600SetTexSampler.BorderColor(radeonTexObjPtr t, const GLfloat color[4])
+static void r600SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
{
t->TD_PS_SAMPLER0_BORDER_ALPHA = *((uint32_t*)&(color[3]));
t->TD_PS_SAMPLER0_BORDER_BLUE = *((uint32_t*)&(color[2]));
@@ -292,7 +292,7 @@ static void r600TexParameter(struct gl_context * ctx, GLenum target,
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
- r600SetTexFilter(t, texObj->Sampler.MinFilter, texObj->Sampler.MagFilter, texObj->MaxAnisotropy);
+ r600SetTexFilter(t, texObj->Sampler.MinFilter, texObj->Sampler.MagFilter, texObj->Sampler.MaxAnisotropy);
break;
case GL_TEXTURE_WRAP_S:
@@ -302,7 +302,7 @@ static void r600TexParameter(struct gl_context * ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- r600SetTexSampler.BorderColor(t, texObj->Sampler.BorderColor.f);
+ r600SetTexBorderColor(t, texObj->Sampler.BorderColor.f);
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -382,13 +382,13 @@ static struct gl_texture_object *r600NewTextureObject(struct gl_context * ctx,
t, _mesa_lookup_enum_by_nr(target));
_mesa_initialize_texture_object(&t->base, name, target);
- t->base.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
+ t->base.Sampler.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
/* Initialize hardware state */
r600SetTexDefaultState(t);
r600UpdateTexWrap(t);
- r600SetTexFilter(t, t->base.Sampler.MinFilter, t->base.Sampler.MagFilter, t->base.MaxAnisotropy);
- r600SetTexSampler.BorderColor(t, t->base.Sampler.BorderColor.f);
+ r600SetTexFilter(t, t->base.Sampler.MinFilter, t->base.Sampler.MagFilter, t->base.Sampler.MaxAnisotropy);
+ r600SetTexBorderColor(t, t->base.Sampler.BorderColor.f);
return &t->base;
}
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index aafa6875774..3568a5515be 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -571,7 +571,7 @@ static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, gl_format mesa
default:
break;
};
- switch (tObj->DepthMode) {
+ switch (tObj->Sampler.DepthMode) {
case GL_LUMINANCE: /* X, X, X, ONE */
SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
@@ -777,18 +777,18 @@ static GLboolean setup_hardware_state(struct gl_context * ctx, struct gl_texture
SETfield(t->SQ_TEX_RESOURCE5, t->maxLod - t->minLod, LAST_LEVEL_shift, LAST_LEVEL_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- S_FIXED(CLAMP(t->base.MinLod - t->minLod, 0, 15), 6),
+ S_FIXED(CLAMP(t->base.Sampler.MinLod - t->minLod, 0, 15), 6),
MIN_LOD_shift, MIN_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- S_FIXED(CLAMP(t->base.MaxLod - t->minLod, 0, 15), 6),
+ S_FIXED(CLAMP(t->base.Sampler.MaxLod - t->minLod, 0, 15), 6),
MAX_LOD_shift, MAX_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.LodBias, -16, 16), 6),
+ S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.Sampler.LodBias, -16, 16), 6),
SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_shift, SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_mask);
- if(texObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
+ if(texObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
{
- SETfield(t->SQ_TEX_SAMPLER0, r600_translate_shadow_func(texObj->CompareFunc), DEPTH_COMPARE_FUNCTION_shift, DEPTH_COMPARE_FUNCTION_mask);
+ SETfield(t->SQ_TEX_SAMPLER0, r600_translate_shadow_func(texObj->Sampler.CompareFunc), DEPTH_COMPARE_FUNCTION_shift, DEPTH_COMPARE_FUNCTION_mask);
}
else
{
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index ff456c67e2e..4ec2845ab44 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -141,7 +141,7 @@ static void r700SendTexSamplerState(struct gl_context *ctx, struct radeon_state_
}
}
-static void r700SendTexSampler.BorderColorState(struct gl_context *ctx, struct radeon_state_atom *atom)
+static void r700SendTexBorderColorState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1640,7 +1640,7 @@ void r600InitAtoms(context_t *context)
ALLOC_STATE(vtx, vtx, (VERT_ATTRIB_MAX * 18), r700SendVTXState);
ALLOC_STATE(tx, tx, (R700_TEXTURE_NUMBERUNITS * 20), r700SendTexState);
ALLOC_STATE(tx_smplr, tx, (R700_TEXTURE_NUMBERUNITS * 5), r700SendTexSamplerState);
- ALLOC_STATE(tx_brdr_clr, tx, (R700_TEXTURE_NUMBERUNITS * 6), r700SendTexSampler.BorderColorState);
+ ALLOC_STATE(tx_brdr_clr, tx, (R700_TEXTURE_NUMBERUNITS * 6), r700SendTexBorderColorState);
r600_init_query_stateobj(&context->radeon, 6 * 2);
context->radeon.hw.is_dirty = GL_TRUE;