diff options
author | Marek Olšák <[email protected]> | 2012-03-31 01:31:47 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-01 23:57:50 +0200 |
commit | 669d8766ff3403938794eb80d7769347b6e52174 (patch) | |
tree | ee775a4a51c56ddae6168adb77888d5dd79014e0 /src/gallium/drivers/r600/r600_pipe.h | |
parent | 68e4c83ffa9319c934a96ca1daf25e81b78a6d90 (diff) |
r600g: optimize r600_resource_va
Avoid calling get_radeon_bo and inline it.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 8 |
1 files changed, 8 insertions, 0 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 |