From ae3aecd07f038e1b4e927b7f942c6e865b973a7d Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 30 Oct 2018 11:41:19 +0100 Subject: radv/winsys: fix buffer deletion in the sysmem path In case we failed to submit the CS correctly. Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index 5f621ec3fb8..75f1c47fd90 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -1094,10 +1094,11 @@ static int radv_amdgpu_winsys_cs_submit_sysmem(struct radeon_winsys_ctx *_ctx, for (unsigned j = 0; j < number_of_ibs; j++) { ws->buffer_destroy(bos[j]); - if (r) - return r; } + if (r) + return r; + i += cnt; } if (fence) -- cgit v1.2.3