summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 9e4cc777a9..f6f0c39066 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1388,7 +1388,7 @@ static GLuint translate_lod_bias(GLfloat bias)
b = (1 << 9)-1;
else if (b < -(1 << 9))
b = -(1 << 9);
- return ((GLuint)b) << R300_LOD_BIAS_SHIFT;
+ return (((GLuint)b) << R300_LOD_BIAS_SHIFT) & R300_LOD_BIAS_MASK;
}
static void r300SetupTextures(GLcontext * ctx)