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, ...).


try 2:

I believe I have found the problem... the attributes weren't copied..

Patch attached.


Rune Petersen
Index: radeon_vtxfmt_a.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/radeon_vtxfmt_a.c,v
retrieving revision 1.14
diff -u -r1.14 radeon_vtxfmt_a.c
--- radeon_vtxfmt_a.c   12 Jun 2006 22:39:49 -0000      1.14
+++ radeon_vtxfmt_a.c   26 Jun 2006 18:18:06 -0000
@@ -73,6 +73,9 @@
        
        for (i=0; i < ctx->Const.MaxTextureCoordUnits; i++)
                CONV_VB(VERT_ATTRIB_TEX0 + i, TexCoordPtr[i]);
+
+       for (i=0; i < 16; i++)
+               CONV_VB(VERT_ATTRIB_GENERIC0 + i, 
AttribPtr[VERT_ATTRIB_GENERIC0 + i]);
        
        rvb->Primitive = vb->Primitive;
        rvb->PrimitiveCount = vb->PrimitiveCount;
Index: r300_maos.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_maos.c,v
retrieving revision 1.33
diff -u -r1.33 r300_maos.c
--- r300_maos.c 12 Jun 2006 22:39:49 -0000      1.33
+++ r300_maos.c 26 Jun 2006 18:18:06 -0000
@@ -368,6 +368,12 @@
                                rmesa->state.aos[nr++].aos_reg = 
prog->inputs[VERT_ATTRIB_TEX0+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];
+                       }
+               }
                nr = 0;
        } else {
                RENDERINPUTS_COPY( inputs_bitset, 
TNL_CONTEXT(ctx)->render_inputs_bitset );
@@ -457,6 +463,14 @@
                        r300->state.texture.tc_count++;
                }
        }
+       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],
+                                                       immd ? 4 : 
VB->AttribPtr[VERT_ATTRIB_GENERIC0+i].size,
+                                                       count);
+               }
+       }
        for(i=0; i < nr; i++)
                if(r300->state.aos[i].aos_format == 2){
                        assert(r300->state.aos[i].aos_size == 1);
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