void
i830InitTextureFuncs(struct dd_function_table *functions)
{
+/*
functions->TexEnv = i830TexEnv;
+*/
}
{
GLcontext *ctx = &intel->ctx;
struct i830_context *i830 = i830_context(ctx);
- struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
+ struct gl_texture_unit *tUnit = &ctx->Texture.Unit[unit];
+ struct gl_texture_object *tObj = tUnit->_Current;
struct intel_texture_object *intelObj = intel_texture_object(tObj);
struct gl_texture_image *firstImage;
GLuint *state = i830->state.Tex[unit], format, pitch;
+ GLint lodbias;
memset(state, 0, sizeof(state));
}
}
- state[I830_TEXREG_TM0S3] = i830->lodbias_tm0s3[unit];
-
+ lodbias = (int) ((tUnit->LodBias + tObj->LodBias) * 16.0);
+ if (lodbias < -64)
+ lodbias = -64;
+ if (lodbias > 63)
+ lodbias = 63;
+
+ state[I830_TEXREG_TM0S3] = ((lodbias << TM0S3_LOD_BIAS_SHIFT) &
+ TM0S3_LOD_BIAS_MASK);
#if 0
/* YUV conversion:
*/
void
i915InitTextureFuncs(struct dd_function_table *functions)
{
+/*
functions->TexEnv = i915TexEnv;
+*/
}
{
GLcontext *ctx = &intel->ctx;
struct i915_context *i915 = i915_context(ctx);
- struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
+ struct gl_texture_unit *tUnit = &ctx->Texture.Unit[unit];
+ struct gl_texture_object *tObj = tUnit->_Current;
struct intel_texture_object *intelObj = intel_texture_object(tObj);
struct gl_texture_image *firstImage;
GLuint *state = i915->state.Tex[unit], format, pitch;
+ GLint lodbias;
memset(state, 0, sizeof(state));
}
}
- state[I915_TEXREG_SS2] = i915->lodbias_ss2[unit];
+ lodbias = (int) ((tUnit->LodBias + tObj->LodBias) * 16.0);
+ if (lodbias < -256)
+ lodbias = -256;
+ if (lodbias > 255)
+ lodbias = 255;
+ state[I915_TEXREG_SS2] = ((lodbias << SS2_LOD_BIAS_SHIFT) &
+ SS2_LOD_BIAS_MASK);
/* YUV conversion:
*/