summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatthieu Castet <castet.matthieu@free.fr>2007-09-13 22:13:39 +0200
committerMatthieu Castet <castet.matthieu@free.fr>2007-09-13 22:13:39 +0200
commit3a2559a1e9989655591b7faf93ea6bfa21dbff1b (patch)
treebb7eefd37f3754b7008fdf17939ce4fedd3ae9d9 /src/mesa/drivers/dri
parentab31a3a7647ca1b1567dbc58c6093c523173c988 (diff)
nouveau : diable broken light enable on nv10
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c
index b63893d05c..154ba3cce1 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state.c
@@ -323,6 +323,11 @@ static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state)
break;
// case GL_HISTOGRAM:
// case GL_INDEX_LOGIC_OP:
+#if 0
+ /* light is broken, the hardware seem to only allow to use light
+ * in order : ie GL_LIGHT0 & GL_LIGHT2 is invalid
+ * In this case the blob remap GL_LIGHT2 to hw light 1
+ */
case GL_LIGHT0:
case GL_LIGHT1:
case GL_LIGHT2:
@@ -333,7 +338,11 @@ static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state)
case GL_LIGHT7:
{
uint32_t mask=1<<(2*(cap-GL_LIGHT0));
- nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state));
+ if (state)
+ nmesa->enabled_lights |= mask;
+ else
+ nmesa->enabled_lights &= ~mask;
+
if (nmesa->lighting_enabled)
{
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1);
@@ -349,6 +358,7 @@ static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state)
else
OUT_RING_CACHE(0x0);
break;
+#endif
case GL_LINE_SMOOTH:
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING_CACHE(state);