summaryrefslogtreecommitdiff
path: root/src/amd/vulkan/radv_meta_buffer.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2017-09-17 12:15:02 +0200
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2017-09-20 22:04:25 +0200
commitd235ff6e8f009972a145f19db5c21699e84f1277 (patch)
treea3fd24ad1c3bf20d7d49a1d4c0460d1f1803577c /src/amd/vulkan/radv_meta_buffer.c
parentef721c77f12b7a8e6281fb56c85d4e09b14aeca8 (diff)
radv: Don't use a virtual function for getting the buffer virtual address.
We are really not going to use a winsys which does not need to store the va, so might as well store it in a standard field. Not sure this helps perf much though, as most of the cost is in the cache miss accessing the bo anyway, which we stil need to do. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/amd/vulkan/radv_meta_buffer.c')
-rw-r--r--src/amd/vulkan/radv_meta_buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index a8a41e05fa3..a16c65aab81 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -418,7 +418,7 @@ void radv_fill_buffer(struct radv_cmd_buffer *cmd_buffer,
if (size >= 4096)
fill_buffer_shader(cmd_buffer, bo, offset, size, value);
else if (size) {
- uint64_t va = cmd_buffer->device->ws->buffer_get_va(bo);
+ uint64_t va = radv_buffer_get_va(bo);
va += offset;
cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, bo, 8);
si_cp_dma_clear_buffer(cmd_buffer, va, size, value);
@@ -436,8 +436,8 @@ void radv_copy_buffer(struct radv_cmd_buffer *cmd_buffer,
copy_buffer_shader(cmd_buffer, src_bo, dst_bo,
src_offset, dst_offset, size);
else if (size) {
- uint64_t src_va = cmd_buffer->device->ws->buffer_get_va(src_bo);
- uint64_t dst_va = cmd_buffer->device->ws->buffer_get_va(dst_bo);
+ uint64_t src_va = radv_buffer_get_va(src_bo);
+ uint64_t dst_va = radv_buffer_get_va(dst_bo);
src_va += src_offset;
dst_va += dst_offset;
@@ -497,7 +497,7 @@ void radv_CmdUpdateBuffer(
RADV_FROM_HANDLE(radv_buffer, dst_buffer, dstBuffer);
bool mec = radv_cmd_buffer_uses_mec(cmd_buffer);
uint64_t words = dataSize / 4;
- uint64_t va = cmd_buffer->device->ws->buffer_get_va(dst_buffer->bo);
+ uint64_t va = radv_buffer_get_va(dst_buffer->bo);
va += dstOffset + dst_buffer->offset;
assert(!(dataSize & 3));