diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-09-17 12:15:02 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-09-20 22:04:25 +0200 |
commit | d235ff6e8f009972a145f19db5c21699e84f1277 (patch) | |
tree | a3fd24ad1c3bf20d7d49a1d4c0460d1f1803577c /src/amd/vulkan/radv_query.c | |
parent | ef721c77f12b7a8e6281fb56c85d4e09b14aeca8 (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 <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_query.c')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 3c40774042d..4f79db4a93b 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -952,8 +952,8 @@ void radv_CmdCopyQueryPoolResults( RADV_FROM_HANDLE(radv_buffer, dst_buffer, dstBuffer); struct radeon_winsys_cs *cs = cmd_buffer->cs; unsigned elem_size = (flags & VK_QUERY_RESULT_64_BIT) ? 8 : 4; - uint64_t va = cmd_buffer->device->ws->buffer_get_va(pool->bo); - uint64_t dest_va = cmd_buffer->device->ws->buffer_get_va(dst_buffer->bo); + uint64_t va = radv_buffer_get_va(pool->bo); + uint64_t dest_va = radv_buffer_get_va(dst_buffer->bo); dest_va += dst_buffer->offset + dstOffset; cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, pool->bo, 8); @@ -1057,7 +1057,7 @@ void radv_CmdResetQueryPool( { RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); RADV_FROM_HANDLE(radv_query_pool, pool, queryPool); - uint64_t va = cmd_buffer->device->ws->buffer_get_va(pool->bo); + uint64_t va = radv_buffer_get_va(pool->bo); cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, pool->bo, 8); @@ -1078,7 +1078,7 @@ void radv_CmdBeginQuery( RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); RADV_FROM_HANDLE(radv_query_pool, pool, queryPool); struct radeon_winsys_cs *cs = cmd_buffer->cs; - uint64_t va = cmd_buffer->device->ws->buffer_get_va(pool->bo); + uint64_t va = radv_buffer_get_va(pool->bo); va += pool->stride * query; cmd_buffer->device->ws->cs_add_buffer(cs, pool->bo, 8); @@ -1118,7 +1118,7 @@ void radv_CmdEndQuery( RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); RADV_FROM_HANDLE(radv_query_pool, pool, queryPool); struct radeon_winsys_cs *cs = cmd_buffer->cs; - uint64_t va = cmd_buffer->device->ws->buffer_get_va(pool->bo); + uint64_t va = radv_buffer_get_va(pool->bo); uint64_t avail_va = va + pool->availability_offset + 4 * query; va += pool->stride * query; @@ -1170,7 +1170,7 @@ void radv_CmdWriteTimestamp( RADV_FROM_HANDLE(radv_query_pool, pool, queryPool); bool mec = radv_cmd_buffer_uses_mec(cmd_buffer); struct radeon_winsys_cs *cs = cmd_buffer->cs; - uint64_t va = cmd_buffer->device->ws->buffer_get_va(pool->bo); + uint64_t va = radv_buffer_get_va(pool->bo); uint64_t avail_va = va + pool->availability_offset + 4 * query; uint64_t query_va = va + pool->stride * query; |