Eric,

This change broke softpipe on master (eg. terrain), and probably all gallium 
based drivers. I'm pretty sure the vbo module was working correctly without it, 
so there might be a different in the interpretation of the MapBufferRange 
semantics between the drivers, but I couldn't find it just by llooking at 
intel's and mesa state tracker implementation of MapBufferRange.

Was there any particular bug this change fixed?

Jose


________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Eric Anholt 
[[email protected]]
Sent: Friday, August 28, 2009 23:31
To: [email protected]
Subject: Mesa (master): vbo:    Fix array pointer calculation for 
MapBufferRange-mapped vertex data.

Module: Mesa
Branch: master
Commit: 8096aa521369c3bcf5226c060efa6dd06e48ddc8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8096aa521369c3bcf5226c060efa6dd06e48ddc8

Author: Eric Anholt <[email protected]>
Date:   Fri Aug 28 14:44:55 2009 -0700

vbo: Fix array pointer calculation for MapBufferRange-mapped vertex data.

We would end up with the offset from the start of the mapping rather than
the offset from the start of the buffer.

---

 src/mesa/vbo/vbo_exec_draw.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 53fa90b..0c258c5 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -218,7 +218,9 @@ vbo_exec_bind_arrays( GLcontext *ctx )
             /* a real buffer obj: Ptr is an offset, not a pointer*/
             GLsizeiptr offset;
             assert(exec->vtx.bufferobj->Pointer);  /* buf should be mapped */
-            offset = (GLbyte *) data - (GLbyte *) exec->vtx.bufferobj->Pointer;
+            offset = (GLbyte *) data -
+              (GLbyte *) exec->vtx.bufferobj->Pointer +
+              exec->vtx.bufferobj->Offset;
             assert(offset >= 0);
             arrays[attr].Ptr = (void *) offset;
          }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to