diff options
author | Marek Olšák <[email protected]> | 2012-10-08 04:06:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-10-11 21:12:16 +0200 |
commit | 369e46888904c6d379b8b477d9242cff1608e30e (patch) | |
tree | 528b10f900f23af3acd22a0edcf50fde0eeee86e /src/gallium/drivers/r600/evergreen_compute.h | |
parent | ec4c74a9dc10039d97ad24c4f16bd2400517991d (diff) |
gallium: unify transfer functions
"get_transfer + transfer_map" becomes "transfer_map".
"transfer_unmap + transfer_destroy" becomes "transfer_unmap".
transfer_map must create and return the transfer object and transfer_unmap
must destroy it.
transfer_map is successful if the returned buffer pointer is not NULL.
If transfer_map fails, the pointer to the transfer object remains unchanged
(i.e. doesn't have to be NULL).
Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_compute.h')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.h b/src/gallium/drivers/r600/evergreen_compute.h index f29d91b9349..e68ebd8585e 100644 --- a/src/gallium/drivers/r600/evergreen_compute.h +++ b/src/gallium/drivers/r600/evergreen_compute.h @@ -41,11 +41,14 @@ void evergreen_emit_cs_shader(struct r600_context *rctx, struct r600_atom * atom struct pipe_resource *r600_compute_global_buffer_create(struct pipe_screen *screen, const struct pipe_resource *templ); void r600_compute_global_buffer_destroy(struct pipe_screen *screen, struct pipe_resource *res); -void* r600_compute_global_transfer_map(struct pipe_context *ctx, struct pipe_transfer* transfer); +void *r600_compute_global_transfer_map( + struct pipe_context *ctx_, + struct pipe_resource *resource, + unsigned level, + unsigned usage, + const struct pipe_box *box, + struct pipe_transfer **ptransfer); void r600_compute_global_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer* transfer); -struct pipe_transfer * r600_compute_global_get_transfer(struct pipe_context *, struct pipe_resource *, unsigned level, - unsigned usage, const struct pipe_box *); -void r600_compute_global_transfer_destroy(struct pipe_context *, struct pipe_transfer *); void r600_compute_global_transfer_flush_region( struct pipe_context *, struct pipe_transfer *, const struct pipe_box *); void r600_compute_global_transfer_inline_write( struct pipe_context *, struct pipe_resource *, unsigned level, unsigned usage, const struct pipe_box *, const void *data, unsigned stride, unsigned layer_stride); |