From: Vladimir Dergachev Date: Mon, 31 Jan 2005 02:52:59 +0000 (+0000) Subject: Use SecondaryColorPtr, not ColorPtr[1] (the latter is NULL). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c1773e505307140f78eae139060feff09f9bc4f;p=mesa.git Use SecondaryColorPtr, not ColorPtr[1] (the latter is NULL). This fixes segfault in tuxracer-demo. It locks up after this though. --- diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index d1dd82ad919..f4596aad639 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -248,7 +248,7 @@ static void r300_render_immediate_primitive(r300ContextPtr rmesa, if(tnl->render_inputs & _TNL_BIT_COLOR0) output_vector(VB->ColorPtr[0], i); if(tnl->render_inputs & _TNL_BIT_COLOR1) - output_vector(VB->ColorPtr[1], i); + output_vector(VB->SecondaryColorPtr[0], i); if(tnl->render_inputs & _TNL_BIT_FOG) output_vector(VB->FogCoordPtr, i); diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index dedc5df0a8a..3e7a4653e5b 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -846,7 +846,7 @@ void r300_setup_routing(GLcontext *ctx, GLboolean immediate) if(tnl->render_inputs & _TNL_BIT_COLOR0) CONFIGURE_AOS(VB->ColorPtr[0], 0, i_color[0], AOS_FORMAT_FLOAT_COLOR); if(tnl->render_inputs & _TNL_BIT_COLOR1) - CONFIGURE_AOS(VB->ColorPtr[1], 0, i_color[1], AOS_FORMAT_FLOAT_COLOR); + CONFIGURE_AOS(VB->SecondaryColorPtr[0], 0, i_color[1], AOS_FORMAT_FLOAT_COLOR); if(tnl->render_inputs & _TNL_BIT_FOG) CONFIGURE_AOS(VB->FogCoordPtr, 0, i_fog, AOS_FORMAT_FLOAT); diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c index 926031c8051..49631d6b9ff 100644 --- a/src/mesa/drivers/dri/r300/r300_texmem.c +++ b/src/mesa/drivers/dri/r300/r300_texmem.c @@ -406,7 +406,7 @@ static void uploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t, } while (ret && errno == EAGAIN); UNLOCK_HARDWARE(&rmesa->radeon); - + if (ret) { fprintf(stderr, "DRM_RADEON_TEXTURE: return = %d\n", ret); fprintf(stderr, " offset=0x%08x\n", offset);