pb: add void * for flush ctx to mapping functions
authorDave Airlie <airlied@redhat.com>
Sat, 28 Aug 2010 08:59:32 +0000 (18:59 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 12 Sep 2010 03:32:43 +0000 (13:32 +1000)
commitb5fcf0c8e07e666523b007fab1d0fc18c2c89241
tree2cd8fdfbe697531b04a9912e296df70d554db509
parent95555ed03e95f7472ad1f6c4b43e0aa7aaa13f93
pb: add void * for flush ctx to mapping functions

If the buffer we are attempting to map is referenced by the unsubmitted
command stream for this context, we need to flush the command stream,
however to do that we need to be able to access the context at the lowest
level map function, currently we set the buffer in the toplevel map, but this
racy between context. (we probably have a lot more issues than that.)

I'll look into a proper solution as suggested by jrfonseca when I get some time.
src/gallium/auxiliary/pipebuffer/pb_buffer.h
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
src/gallium/drivers/r600/r600_buffer.c
src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
src/gallium/winsys/svga/drm/vmw_screen_svga.c