diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.h | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index c5ea55eba32..9139b61ed69 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -696,4 +696,12 @@ static INLINE unsigned r600_pack_float_12p4(float x) x >= 4096 ? 0xffff : x * 16; } +static INLINE uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_resource *resource) +{ + struct r600_screen *rscreen = (struct r600_screen*)screen; + struct r600_resource *rresource = (struct r600_resource*)resource; + + return rscreen->ws->buffer_get_virtual_address(rresource->cs_buf); +} + #endif diff --git a/src/gallium/drivers/r600/r600_resource.c b/src/gallium/drivers/r600/r600_resource.c index 0689d91a299..de339e03512 100644 --- a/src/gallium/drivers/r600/r600_resource.c +++ b/src/gallium/drivers/r600/r600_resource.c @@ -62,14 +62,3 @@ void r600_init_context_resource_functions(struct r600_context *r600) r600->context.transfer_destroy = u_transfer_destroy_vtbl; r600->context.transfer_inline_write = u_default_transfer_inline_write; } - -uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_resource *resource) -{ - struct r600_screen *rscreen = (struct r600_screen*)screen; - struct r600_resource *rresource = (struct r600_resource*)resource; - - if (rresource->buf) { - return rscreen->ws->buffer_get_virtual_address(rresource->buf); - } - return 0; -} diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index 15b706dc3b8..5bb5e577ee6 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -98,6 +98,4 @@ struct r600_context; void r600_upload_const_buffer(struct r600_context *rctx, struct r600_resource **rbuffer, uint32_t *offset); -uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_resource *resource); - #endif |