On Wed, 2004-10-06 at 04:54, Felix Kühling wrote:
> On Mon, 04 Oct 2004 12:09:09 +0100
> Keith Whitwell <[EMAIL PROTECTED]> wrote:
> 
> > John,
> > 
> > I'd say the problem is with these lines in savagetris.c:
> > 
> > 
> >    if (index & (_TNL_BIT_COLOR1|_TNL_BIT_FOG)) {
> >        EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_BGR, SAVAGE_HW_NO_CS );
> >        EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, SAVAGE_HW_NO_CS );
> >     }
> > 
> > This is a cut and paste of old code from another driver.  Have a look at how 
> > other drivers handle this now to avoid trying to emit FOG when only COLOR1 is 
> > enabled, and vice versa.
> 
> Is there a simpler test case than RTCW? I can't reproduce a segfault
> with a simple program that draws triangles with diffuse lighting and
> Fog. John, can you try if the attached patch fixes it?

One thing to note is, what happens if you change from, say,
specular-without-fog to specular-with-fog?  You won't end up doing the
install_attrs again like you want.  For Rage 128, I just stored the
index in the context and checked if that had changed, instead of the
vertex format register's value.

-- 
Eric Anholt                                [EMAIL PROTECTED]          
http://people.freebsd.org/~anholt/         [EMAIL PROTECTED]




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to