On Thu, Mar 10, 2011 at 11:45 PM, Thomas Hellstrom <thellst...@vmware.com>wrote:
> Hi, > > I've been working a bit on optimizing uploads of non-vbo vertex arrays on > the svga device. > Since we have no knowledge of the vertex array size before a draw call and > the vertex array may change values in between subsequent draw calls it's > pretty pointless to upload the whole array to gpu memory. I basically want > to upload only the vertices affected by each draw call. > This is the same optimization r300g and r600g already have. > > Here's where redefine_user_buffer() comes in, but to be able to use it for > this optimization we must require that a subsequent draw call referencing > the user buffer must not access any data outside [offset, offset+size-1]. A > stronger restriction than the comment in the p_context.h header file. > The problem is we don't have any other info about user buffers in st/mesa than the minimum and maximum index. We pass that info to both redefine_user_buffer and draw_vbo. Whether you use redefine_user_buffer or pipe_draw_info is up to you. The Radeon drivers chose the latter. Marek
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev