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_radeon_winsys.h | |
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_radeon_winsys.h')
-rw-r--r-- | src/amd/vulkan/radv_radeon_winsys.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index f7399de1aed..52b55c38e69 100644 --- a/src/amd/vulkan/radv_radeon_winsys.h +++ b/src/amd/vulkan/radv_radeon_winsys.h @@ -133,9 +133,11 @@ struct radeon_bo_metadata { }; uint32_t syncobj_handle; -struct radeon_winsys_bo; struct radeon_winsys_fence; +struct radeon_winsys_bo { + uint64_t va; +}; struct radv_winsys_sem_counts { uint32_t syncobj_count; uint32_t sem_count; @@ -180,8 +182,6 @@ struct radeon_winsys { void (*buffer_unmap)(struct radeon_winsys_bo *bo); - uint64_t (*buffer_get_va)(struct radeon_winsys_bo *bo); - void (*buffer_set_metadata)(struct radeon_winsys_bo *bo, struct radeon_bo_metadata *md); @@ -263,4 +263,9 @@ static inline void radeon_emit_array(struct radeon_winsys_cs *cs, cs->cdw += count; } +static inline uint64_t radv_buffer_get_va(struct radeon_winsys_bo *bo) +{ + return bo->va; +} + #endif /* RADV_RADEON_WINSYS_H */ |