summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_radeon_winsys.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-06 04:06:35 +0000
committerDave Airlie <[email protected]>2017-11-06 21:45:59 +0000
commit201b3b8d0d2359f56d8797867f59047cce5d160d (patch)
treecb72bf5c4d795c826bf01b9a2fd5c318a3bca15c /src/amd/vulkan/radv_radeon_winsys.h
parent25660499b62a60f99ad72807fcc37f9fb622a2ea (diff)
radv: move is_local up to the winsys level.
We can avoid adding the buffer in the non-local case, this will avoid all the overhead of the indirect call. Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_radeon_winsys.h')
-rw-r--r--src/amd/vulkan/radv_radeon_winsys.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h
index bab19a6233d..66a2bcccb4d 100644
--- a/src/amd/vulkan/radv_radeon_winsys.h
+++ b/src/amd/vulkan/radv_radeon_winsys.h
@@ -147,6 +147,7 @@ struct radeon_winsys_fence;
struct radeon_winsys_bo {
uint64_t va;
+ bool is_local;
};
struct radv_winsys_sem_counts {
uint32_t syncobj_count;
@@ -284,6 +285,9 @@ static inline void radv_cs_add_buffer(struct radeon_winsys *ws,
struct radeon_winsys_bo *bo,
uint8_t priority)
{
+ if (bo->is_local)
+ return;
+
ws->cs_add_buffer(cs, bo, priority);
}