radv/winsys: do not assign last submission when chained path failed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 30 Oct 2018 10:41:20 +0000 (11:41 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 31 Oct 2018 08:21:28 +0000 (09:21 +0100)
I don't think we want to wait for something that hasn't been
correctly submitted. This is similar to the fallback path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c

index 75f1c47fd903facced30fd1b436bffa6797f1125..abc4f3903d39e32e1c61723d67da883b162ad666 100644 (file)
@@ -840,12 +840,15 @@ static int radv_amdgpu_winsys_cs_submit_chained(struct radeon_winsys_ctx *_ctx,
        if (bo_list)
                amdgpu_bo_list_destroy(bo_list);
 
+       if (r)
+               return r;
+
        if (fence)
                radv_amdgpu_request_to_fence(ctx, fence, &request);
 
        radv_assign_last_submit(ctx, &request);
 
-       return r;
+       return 0;
 }
 
 static int radv_amdgpu_winsys_cs_submit_fallback(struct radeon_winsys_ctx *_ctx,