summaryrefslogtreecommitdiff
path: root/xc/lib/GL
diff options
context:
space:
mode:
authorkeithw <keithw>2003-07-27 03:12:51 +0000
committerkeithw <keithw>2003-07-27 03:12:51 +0000
commitd90ab9ec75776bbf41d24221cfec31a8c2ec371b (patch)
treeee1e28f786931f6f6412945505b4307f105dbad7 /xc/lib/GL
parent2eec9ff7dedceeaaa92d41403cc79f61469081f8 (diff)
Fix test_gl3.c -- turn on range attenuation bit for positional lights
Diffstat (limited to 'xc/lib/GL')
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/radeon_state.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xc/lib/GL/mesa/src/drv/radeon/radeon_state.c b/xc/lib/GL/mesa/src/drv/radeon/radeon_state.c
index 9c207f92f..f0e206231 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/radeon_state.c
+++ b/xc/lib/GL/mesa/src/drv/radeon/radeon_state.c
@@ -1055,9 +1055,15 @@ static void radeonLightfv( GLcontext *ctx, GLenum light,
case GL_POSITION: {
/* positions picked up in update_light, but can do flag here */
- GLuint flag = (p&1)? RADEON_LIGHT_1_IS_LOCAL : RADEON_LIGHT_0_IS_LOCAL;
+ GLuint flag;
GLuint idx = TCL_PER_LIGHT_CTL_0 + p/2;
+ /* FIXME: Set RANGE_ATTEN only when needed */
+ if (p&1)
+ flag = RADEON_LIGHT_1_IS_LOCAL | RADEON_LIGHT_1_ENABLE_RANGE_ATTEN;
+ else
+ flag = RADEON_LIGHT_0_IS_LOCAL | RADEON_LIGHT_0_ENABLE_RANGE_ATTEN;
+
RADEON_STATECHANGE(rmesa, tcl);
if (l->EyePosition[3] != 0.0F)
rmesa->hw.tcl.cmd[idx] |= flag;