diff options
author | Dave Airlie <airlied@redhat.com> | 2010-08-28 18:59:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-09-12 13:32:43 +1000 |
commit | b5fcf0c8e07e666523b007fab1d0fc18c2c89241 (patch) | |
tree | 2cd8fdfbe697531b04a9912e296df70d554db509 /src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c | |
parent | 95555ed03e95f7472ad1f6c4b43e0aa7aaa13f93 (diff) |
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.
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c index 31f1ebbeb7..694a092f3c 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c @@ -103,13 +103,13 @@ pb_ondemand_buffer_destroy(struct pb_buffer *_buf) static void * pb_ondemand_buffer_map(struct pb_buffer *_buf, - unsigned flags) + unsigned flags, void *flush_ctx) { struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); if(buf->buffer) { assert(!buf->data); - return pb_map(buf->buffer, flags); + return pb_map(buf->buffer, flags, flush_ctx); } else { assert(buf->data); @@ -150,7 +150,7 @@ pb_ondemand_buffer_instantiate(struct pb_ondemand_buffer *buf) if(!buf->buffer) return PIPE_ERROR_OUT_OF_MEMORY; - map = pb_map(buf->buffer, PB_USAGE_CPU_READ); + map = pb_map(buf->buffer, PB_USAGE_CPU_READ, NULL); if(!map) { pb_reference(&buf->buffer, NULL); return PIPE_ERROR; |