Aapo Tahkola [2006-06-27 04:28]:
> On Mon, 26 Jun 2006 21:22:12 +0200
> Rune Petersen <[EMAIL PROTECTED]> wrote:
> 
> > Brian Paul wrote:
> > > Rune Petersen wrote:
> > >> Tilman Sauerbeck wrote:
> > >>
> > >>> Rune Petersen [2006-06-25 16:31]:
> > >>>
> > >>>> I've been looking at vertex shaders this weekend.
> > >>>>
> > >>>> It would appear that attribs are broken. The most straight
> > >>>> forward way to test this it to compare progs/tests/arbvptest3 to 
> > >>>> progs/tests/vptest3
> > >>>>
> > >>>> On my system I get different colors when I resize the window.
> > >>>>
> > >>>> Can someone confirm this? (it would explain why Doom 3 is broken)
> > >>>
> > >>> Yes, I have reported this some weeks ago:
> > >>> http://marc.theaimsgroup.com/?l=dri-devel&m=114855685402158&w=2
> > >>>
> > >>
> > >> Don't know how I fixed that...
> > >>
> > >> It would appear to be caused bu the reshuffling of the attribs.
> > >>
> > >> Any idea where the attribs are passed to the driver?
> > >> and how to read the data in the attribs...
> > > 
> > > I can't comment on the r300 driver, but the change in vertex
> > > aliasing in core Mesa is pretty simple.  It's really just a change
> > > of which index into the VB->Attribs[] array corresponds to
> > > glVertexAttribARB(index, ...).
> > > 
> > 
> > 
> > This is getting embarrassing...
> > 
> > try 3 attached.
> 
> Checked in. Thanks.

Good job Rune, but didn't you sneak in a couple of off-by-one errors? :)

There's 16 generic TNL attributes, not 15. See the attached patch.

btw, Doom3 runs much better with the ARB2 renderer now, but there's
still some glitches.

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Index: r300_context.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.h,v
retrieving revision 1.98
diff -u -p -r1.98 r300_context.h
--- r300_context.h      27 Jun 2006 01:26:47 -0000      1.98
+++ r300_context.h      27 Jun 2006 16:30:09 -0000
@@ -544,7 +544,7 @@ struct r300_vap_reg_state {
           int i_color[2];
           int i_fog;
           int i_tex[R300_MAX_TEXTURE_UNITS];
-          int i_attrib[_TNL_LAST_GENERIC-_TNL_FIRST_GENERIC];
+          int i_attrib[_TNL_LAST_GENERIC - _TNL_FIRST_GENERIC + 1];
           int i_index;
           int i_pointsize;
        };
Index: r300_maos.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_maos.c,v
retrieving revision 1.34
diff -u -p -r1.34 r300_maos.c
--- r300_maos.c 27 Jun 2006 01:26:47 -0000      1.34
+++ r300_maos.c 27 Jun 2006 16:30:09 -0000
@@ -368,7 +368,7 @@ void r300EmitArrays(GLcontext * ctx, GLb
                                rmesa->state.aos[nr++].aos_reg = 
prog->inputs[VERT_ATTRIB_TEX0+i];
                        }
                }
-               for (i=0;i<(_TNL_LAST_GENERIC-_TNL_FIRST_GENERIC);i++) {
+               for (i=0;i<=(_TNL_LAST_GENERIC-_TNL_FIRST_GENERIC);i++) {
                        if (InputsRead & (1<<(VERT_ATTRIB_GENERIC0+i))) {
                                RENDERINPUTS_SET( inputs_bitset, 
_TNL_ATTRIB_GENERIC(i) );
                                rmesa->state.aos[nr++].aos_reg = 
prog->inputs[VERT_ATTRIB_GENERIC0+i];
@@ -463,7 +463,7 @@ void r300EmitArrays(GLcontext * ctx, GLb
                        r300->state.texture.tc_count++;
                }
        }
-       for (i = 0; i < (_TNL_LAST_GENERIC-_TNL_FIRST_GENERIC); i++) {
+       for (i = 0; i <= (_TNL_LAST_GENERIC-_TNL_FIRST_GENERIC); i++) {
                if (RENDERINPUTS_TEST( inputs_bitset, _TNL_ATTRIB_GENERIC(i) )) 
{
                        CONFIGURE_AOS(i_attrib[i], AOS_FORMAT_FLOAT,
                                                        
VB->AttribPtr[VERT_ATTRIB_GENERIC0+i],

Attachment: pgp1UroyJMmYJ.pgp
Description: PGP signature

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to