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);
}
}
-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]));
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);
}
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;
}
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:
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:
}
}
-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]));
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:
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:
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;
}
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);
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
{
}
}
-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);
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;