summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_texstate.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index af140c85f50..742bb994adb 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -164,7 +164,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
format = translate_texture_format(firstImage->TexFormat,
firstImage->InternalFormat,
- tObj->DepthMode);
+ tObj->Sampler.DepthMode);
pitch = intelObj->mt->region->pitch * intelObj->mt->cpp;
state[I915_TEXREG_MS3] =
@@ -181,7 +181,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
* (lowest resolution) LOD. Use it to cover both MAX_LEVEL and
* MAX_LOD.
*/
- maxlod = MIN2(tObj->MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
+ maxlod = MIN2(tObj->Sampler.MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
state[I915_TEXREG_MS4] =
((((pitch / 4) - 1) << MS4_PITCH_SHIFT) |
MS4_CUBE_FACE_ENA_MASK |
@@ -192,7 +192,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
{
GLuint minFilt, mipFilt, magFilt;
- switch (tObj->MinFilter) {
+ switch (tObj->Sampler.MinFilter) {
case GL_NEAREST:
minFilt = FILTER_NEAREST;
mipFilt = MIPFILTER_NONE;
@@ -221,16 +221,16 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
return GL_FALSE;
}
- if (tObj->MaxAnisotropy > 1.0) {
+ if (tObj->Sampler.MaxAnisotropy > 1.0) {
minFilt = FILTER_ANISOTROPIC;
magFilt = FILTER_ANISOTROPIC;
- if (tObj->MaxAnisotropy > 2.0)
+ if (tObj->Sampler.MaxAnisotropy > 2.0)
aniso = SS2_MAX_ANISO_4;
else
aniso = SS2_MAX_ANISO_2;
}
else {
- switch (tObj->MagFilter) {
+ switch (tObj->Sampler.MagFilter) {
case GL_NEAREST:
magFilt = FILTER_NEAREST;
break;
@@ -242,7 +242,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
}
- lodbias = (int) ((tUnit->LodBias + tObj->LodBias) * 16.0);
+ lodbias = (int) ((tUnit->LodBias + tObj->Sampler.LodBias) * 16.0);
if (lodbias < -256)
lodbias = -256;
if (lodbias > 255)
@@ -258,14 +258,14 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
/* Shadow:
*/
- if (tObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB &&
+ if (tObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB &&
tObj->Target != GL_TEXTURE_3D) {
if (tObj->Target == GL_TEXTURE_1D)
return GL_FALSE;
state[I915_TEXREG_SS2] |=
(SS2_SHADOW_ENABLE |
- intel_translate_shadow_compare_func(tObj->CompareFunc));
+ intel_translate_shadow_compare_func(tObj->Sampler.CompareFunc));
minFilt = FILTER_4X4_FLAT;
magFilt = FILTER_4X4_FLAT;
@@ -278,9 +278,9 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
{
- GLenum ws = tObj->WrapS;
- GLenum wt = tObj->WrapT;
- GLenum wr = tObj->WrapR;
+ GLenum ws = tObj->Sampler.WrapS;
+ GLenum wt = tObj->Sampler.WrapT;
+ GLenum wr = tObj->Sampler.WrapR;
float minlod;
/* We program 1D textures as 2D textures, so the 2D texcoord could
@@ -298,8 +298,8 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
* clamp_to_border.
*/
if (tObj->Target == GL_TEXTURE_3D &&
- (tObj->MinFilter != GL_NEAREST ||
- tObj->MagFilter != GL_NEAREST) &&
+ (tObj->Sampler.MinFilter != GL_NEAREST ||
+ tObj->Sampler.MagFilter != GL_NEAREST) &&
(ws == GL_CLAMP ||
wt == GL_CLAMP ||
wr == GL_CLAMP ||
@@ -322,7 +322,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
(translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) |
(translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT));
- minlod = MIN2(tObj->MinLod, tObj->_MaxLevel - tObj->BaseLevel);
+ minlod = MIN2(tObj->Sampler.MinLod, tObj->_MaxLevel - tObj->BaseLevel);
state[I915_TEXREG_SS3] |= (unit << SS3_TEXTUREMAP_INDEX_SHIFT);
state[I915_TEXREG_SS3] |= (U_FIXED(CLAMP(minlod, 0.0, 11.0), 4) <<
SS3_MIN_LOD_SHIFT);
@@ -330,10 +330,10 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
/* convert border color from float to ubyte */
- CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->BorderColor.f[0]);
- CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->BorderColor.f[1]);
- CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->BorderColor.f[2]);
- CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->BorderColor.f[3]);
+ CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->Sampler.BorderColor.f[0]);
+ CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->Sampler.BorderColor.f[1]);
+ CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->Sampler.BorderColor.f[2]);
+ CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->Sampler.BorderColor.f[3]);
if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
/* GL specs that border color for depth textures is taken from the