r600: be more exact in vb size calculation
authorAndre Maasikas <amaasikas@gmail.com>
Fri, 12 Feb 2010 14:20:50 +0000 (16:20 +0200)
committerAndre Maasikas <amaasikas@gmail.com>
Fri, 12 Feb 2010 14:23:49 +0000 (16:23 +0200)
to make kernel cs checker happier, last attribs don't need full stride of
space. Calculate as count-1*stride + size of attrib

src/mesa/drivers/dri/r600/r700_chip.c

index a068cb604598c68204beb5ba50633f278cf5c834..a742dbcf129c51351ad36d27951aeebc8d20a9af 100644 (file)
@@ -200,7 +200,8 @@ static void r700SetupVTXConstants(GLcontext  * ctx,
     }
     else
     {
-        nVBsize = paos->count * pStreamDesc->stride;
+        nVBsize = (paos->count - 1) * pStreamDesc->stride
+                  + pStreamDesc->size * getTypeSize(pStreamDesc->type);
     }
 
     uSQ_VTX_CONSTANT_WORD0_0 = paos->offset;