diff options
author | Christian König <[email protected]> | 2012-07-24 18:47:19 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-07-30 14:44:38 +0200 |
commit | fe41287ffa8cb35421cadfb16d4cc27c5fcb8b76 (patch) | |
tree | 216c973432d57a84baaf285b50f84bf2364a06bf /src/gallium/drivers/radeonsi/radeonsi_pipe.c | |
parent | dcf8754cce1af09547a5976a74ba807bc6f2657c (diff) |
radeonsi: rename r600_resource to si_resource
Also split it into seperate header and add
some helper functions.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_pipe.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_pipe.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 874356a8edd..3c5eaf7d61c 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -61,9 +61,9 @@ static struct r600_fence *r600_create_fence(struct r600_context *rctx) if (!rscreen->fences.bo) { /* Create the shared buffer object */ - rscreen->fences.bo = (struct r600_resource*) - pipe_buffer_create(&rscreen->screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STAGING, 4096); + rscreen->fences.bo = si_resource_create_custom(&rscreen->screen, + PIPE_USAGE_STAGING, + 4096); if (!rscreen->fences.bo) { R600_ERR("r600: failed to create bo for fence objects\n"); goto out; @@ -119,9 +119,8 @@ static struct r600_fence *r600_create_fence(struct r600_context *rctx) r600_context_emit_fence(rctx, rscreen->fences.bo, fence->index, 1); /* Create a dummy BO so that fence_finish without a timeout can sleep waiting for completion */ - fence->sleep_bo = (struct r600_resource*) - pipe_buffer_create(&rctx->screen->screen, PIPE_BIND_CUSTOM, - PIPE_USAGE_STAGING, 1); + fence->sleep_bo = si_resource_create_custom(&rctx->screen->screen, PIPE_USAGE_STAGING, 1); + /* Add the fence as a dummy relocation. */ r600_context_bo_reloc(rctx, fence->sleep_bo, RADEON_USAGE_READWRITE); @@ -495,7 +494,7 @@ static void r600_destroy_screen(struct pipe_screen* pscreen) } rscreen->ws->buffer_unmap(rscreen->fences.bo->cs_buf); - pipe_resource_reference((struct pipe_resource**)&rscreen->fences.bo, NULL); + si_resource_reference(&rscreen->fences.bo, NULL); } pipe_mutex_destroy(rscreen->fences.mutex); @@ -513,7 +512,7 @@ static void r600_fence_reference(struct pipe_screen *pscreen, if (pipe_reference(&(*oldf)->reference, &newf->reference)) { struct r600_screen *rscreen = (struct r600_screen *)pscreen; pipe_mutex_lock(rscreen->fences.mutex); - pipe_resource_reference((struct pipe_resource**)&(*oldf)->sleep_bo, NULL); + si_resource_reference(&(*oldf)->sleep_bo, NULL); LIST_ADDTAIL(&(*oldf)->head, &rscreen->fences.pool); pipe_mutex_unlock(rscreen->fences.mutex); } |