diff options
author | Marek Olšák <[email protected]> | 2010-05-16 18:31:22 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-16 19:18:10 +0200 |
commit | 581be86342858b0bbe22373f801235a1d3d792db (patch) | |
tree | 885539837986fa82f32a2cf9f738e938a9361a94 /src/gallium | |
parent | 06d4339716794b6868e52313e22cc539528317d5 (diff) |
r300g: expose radeon_bo_wait to the driver
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 3 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_buffer.h | 3 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_buffer.c | 7 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_r300.c | 8 |
4 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index f6cb97bc080..3d0413f90af 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -87,6 +87,9 @@ struct r300_winsys_screen { struct r300_winsys_buffer **pdst, struct r300_winsys_buffer *src); + void (*buffer_wait)(struct r300_winsys_screen *rws, + struct r300_winsys_buffer *buf); + /* Add a pipe_resource to the list of buffer objects to validate. */ boolean (*add_buffer)(struct r300_winsys_screen *winsys, struct r300_winsys_buffer *buf, diff --git a/src/gallium/winsys/radeon/drm/radeon_buffer.h b/src/gallium/winsys/radeon/drm/radeon_buffer.h index b48b6358e01..b9ecf9ded07 100644 --- a/src/gallium/winsys/radeon/drm/radeon_buffer.h +++ b/src/gallium/winsys/radeon/drm/radeon_buffer.h @@ -88,4 +88,7 @@ boolean radeon_drm_bufmgr_get_handle(struct pb_buffer *_buf, boolean radeon_drm_bufmgr_is_buffer_referenced(struct pb_buffer *_buf, enum r300_reference_domain domain); + +void radeon_drm_bufmgr_wait(struct pb_buffer *_buf); + #endif diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c index b8366498922..a05205da886 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c @@ -419,3 +419,10 @@ void radeon_drm_bufmgr_flush_maps(struct pb_manager *_mgr) make_empty_list(&mgr->buffer_map_list); } + +void radeon_drm_bufmgr_wait(struct pb_buffer *_buf) +{ + struct radeon_drm_buffer *buf = get_drm_buffer(_buf); + + radeon_bo_wait(buf->bo); +} diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index 94cd5281e26..e188f7e7ccd 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -98,6 +98,13 @@ static void radeon_r300_winsys_buffer_unmap(struct r300_winsys_screen *ws, pb_unmap(_buf); } +static void radeon_r300_winsys_buffer_wait(struct r300_winsys_screen *ws, + struct r300_winsys_buffer *buf) +{ + struct pb_buffer *_buf = radeon_pb_buffer(buf); + radeon_drm_bufmgr_wait(_buf); +} + static void radeon_r300_winsys_buffer_reference(struct r300_winsys_screen *rws, struct r300_winsys_buffer **pdst, struct r300_winsys_buffer *src) @@ -343,6 +350,7 @@ radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws) ws->base.buffer_get_tiling = radeon_r300_winsys_buffer_get_tiling; ws->base.buffer_map = radeon_r300_winsys_buffer_map; ws->base.buffer_unmap = radeon_r300_winsys_buffer_unmap; + ws->base.buffer_wait = radeon_r300_winsys_buffer_wait; ws->base.buffer_reference = radeon_r300_winsys_buffer_reference; ws->base.buffer_from_handle = radeon_r300_winsys_buffer_from_handle; ws->base.buffer_get_handle = radeon_r300_winsys_buffer_get_handle; |