[Mesa-dev] [PATCH 3/3] radv: always check the return error when submitting a CS
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Fri Jun 22 15:39:01 UTC 2018
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
for the series.
On Thu, Jun 21, 2018 at 2:39 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_device.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index 681d8a12c7..b72b5d969d 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -3175,6 +3175,7 @@ radv_sparse_image_opaque_bind_memory(struct radv_device *device,
> struct radeon_winsys_fence *base_fence = fence ? fence->fence : NULL;
> bool fence_emitted = false;
> VkResult result;
> + int ret;
>
> for (uint32_t i = 0; i < bindInfoCount; ++i) {
> struct radv_winsys_sem_info sem_info;
> @@ -3200,11 +3201,16 @@ radv_sparse_image_opaque_bind_memory(struct radv_device *device,
> return result;
>
> if (pBindInfo[i].waitSemaphoreCount || pBindInfo[i].signalSemaphoreCount) {
> - queue->device->ws->cs_submit(queue->hw_ctx, queue->queue_idx,
> - &queue->device->empty_cs[queue->queue_family_index],
> - 1, NULL, NULL,
> - &sem_info, NULL,
> - false, base_fence);
> + ret = queue->device->ws->cs_submit(queue->hw_ctx, queue->queue_idx,
> + &queue->device->empty_cs[queue->queue_family_index],
> + 1, NULL, NULL,
> + &sem_info, NULL,
> + false, base_fence);
> + if (ret) {
> + radv_loge("failed to submit CS %d\n", i);
> + abort();
> + }
> +
> fence_emitted = true;
> if (fence)
> fence->submitted = true;
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list