Mesa (mesa_7_7_branch): r600: be more exact in vb size calculation

Alex Deucher agd5f at kemper.freedesktop.org
Fri Feb 12 15:37:23 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 0426bccaddf973f2a0b9c9bb8bac7dd07ce18e0a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0426bccaddf973f2a0b9c9bb8bac7dd07ce18e0a

Author: Andre Maasikas <amaasikas at gmail.com>
Date:   Fri Feb 12 16:20:50 2010 +0200

r600: be more exact in vb size calculation

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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 60229f4..817e434 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -176,7 +176,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;




More information about the mesa-commit mailing list