diff options
author | Marek Olšák <[email protected]> | 2012-04-26 12:05:45 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-29 14:48:45 +0200 |
commit | 2ed1cdb2a56257c97f8f64cdefd5f28fb64773b8 (patch) | |
tree | 296dbdd7e998f955145d784c856ee315ac2bcc4c | |
parent | 0a6120244e66494db070ce875c0a464fbc5b15a1 (diff) |
radeonsi: use u_default_transfer_inline_write
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_buffer.c | 25 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_resource.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_texture.c | 2 |
3 files changed, 3 insertions, 26 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_buffer.c b/src/gallium/drivers/radeonsi/r600_buffer.c index eedf9f5ec26..df30ee5bb87 100644 --- a/src/gallium/drivers/radeonsi/r600_buffer.c +++ b/src/gallium/drivers/radeonsi/r600_buffer.c @@ -111,29 +111,6 @@ static void r600_transfer_destroy(struct pipe_context *ctx, util_slab_free(&rctx->pool_transfers, transfer); } -static void r600_buffer_transfer_inline_write(struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride) -{ - struct r600_context *rctx = (struct r600_context*)pipe; - struct r600_resource *rbuffer = r600_resource(resource); - uint8_t *map = NULL; - - assert(rbuffer->b.b.user_ptr == NULL); - - map = rctx->ws->buffer_map(rbuffer->cs_buf, rctx->cs, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | usage); - - memcpy(map + box->x, data, box->width); - - rctx->ws->buffer_unmap(rbuffer->cs_buf); -} - static const struct u_resource_vtbl r600_buffer_vtbl = { u_default_resource_get_handle, /* get_handle */ @@ -143,7 +120,7 @@ static const struct u_resource_vtbl r600_buffer_vtbl = r600_buffer_transfer_map, /* transfer_map */ r600_buffer_transfer_flush_region, /* transfer_flush_region */ r600_buffer_transfer_unmap, /* transfer_unmap */ - r600_buffer_transfer_inline_write /* transfer_inline_write */ + NULL /* transfer_inline_write */ }; bool r600_init_resource(struct r600_screen *rscreen, diff --git a/src/gallium/drivers/radeonsi/r600_resource.c b/src/gallium/drivers/radeonsi/r600_resource.c index 7bdf6d6bd5f..0e861c12be3 100644 --- a/src/gallium/drivers/radeonsi/r600_resource.c +++ b/src/gallium/drivers/radeonsi/r600_resource.c @@ -60,5 +60,5 @@ void r600_init_context_resource_functions(struct r600_context *r600) r600->context.transfer_flush_region = u_transfer_flush_region_vtbl; r600->context.transfer_unmap = u_transfer_unmap_vtbl; r600->context.transfer_destroy = u_transfer_destroy_vtbl; - r600->context.transfer_inline_write = u_transfer_inline_write_vtbl; + r600->context.transfer_inline_write = u_default_transfer_inline_write; } diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c index ab11285de85..e5c7d32e915 100644 --- a/src/gallium/drivers/radeonsi/r600_texture.c +++ b/src/gallium/drivers/radeonsi/r600_texture.c @@ -373,7 +373,7 @@ static const struct u_resource_vtbl r600_texture_vtbl = r600_texture_transfer_map, /* transfer_map */ u_default_transfer_flush_region,/* transfer_flush_region */ r600_texture_transfer_unmap, /* transfer_unmap */ - u_default_transfer_inline_write /* transfer_inline_write */ + NULL /* transfer_inline_write */ }; static struct r600_resource_texture * |