radv: fix checking the return value of cs_finalize()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 24 Jun 2020 13:38:19 +0000 (15:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 24 Jun 2020 13:50:06 +0000 (15:50 +0200)
cs_finalize() now returns a Vulkan error code and VK_SUCCESS is 0.

Fixes: 64a92ef7a26 ("radv/winsys: Distinguish device/host memory errors.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5629>

src/amd/vulkan/radv_device.c

index d16235f7ce1e1d6a309a955f83506938148cf282..534fd5fd47a02c6e43933204d6a710788d79f171 100644 (file)
@@ -4197,7 +4197,7 @@ radv_get_preamble_cs(struct radv_queue *queue,
                                               RADV_CMD_FLAG_START_PIPELINE_STATS, 0);
                }
 
-               if (!queue->device->ws->cs_finalize(cs))
+               if (queue->device->ws->cs_finalize(cs) != VK_SUCCESS)
                        goto fail;
        }