summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index 4e4a82a1f1b..67dc4a8cccb 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -518,7 +518,8 @@ static int radv_amdgpu_create_bo_list(struct radv_amdgpu_winsys *ws,
struct radeon_winsys_cs *extra_cs,
amdgpu_bo_list_handle *bo_list)
{
- int r;
+ int r = 0;
+
if (ws->debug_all_bos) {
struct radv_amdgpu_winsys_bo *bo;
amdgpu_bo_handle *handles;
@@ -636,8 +637,13 @@ static int radv_amdgpu_create_bo_list(struct radv_amdgpu_winsys *ws,
}
}
}
- r = amdgpu_bo_list_create(ws->dev, unique_bo_count, handles,
- priorities, bo_list);
+
+ if (unique_bo_count > 0) {
+ r = amdgpu_bo_list_create(ws->dev, unique_bo_count, handles,
+ priorities, bo_list);
+ } else {
+ *bo_list = 0;
+ }
free(handles);
free(priorities);