summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-09-13 14:45:22 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-09-13 14:45:22 -0600
commit75a0f7f4a73270714181662bbb12dd5de5eb7f79 (patch)
treecd8a8fd2f4bc2a10674e46c0b76a54cc10e5951b
parentd3c77cebff75aea4fe4ce3352fa6ba8fb9c0e09e (diff)
parent3a2559a1e9989655591b7faf93ea6bfa21dbff1b (diff)
Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa
-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);