Mesa (master): turnip: Handle the error path for tu/drm's vkResetFences().
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 20 22:28:44 UTC 2020
Module: Mesa
Branch: master
Commit: d384f3be4c0c753c38498f9cf8f66dedafda0024
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d384f3be4c0c753c38498f9cf8f66dedafda0024
Author: Eric Anholt <eric at anholt.net>
Date: Mon Oct 19 12:14:26 2020 -0700
turnip: Handle the error path for tu/drm's vkResetFences().
OUT_OF_MEMORY is the only valid error code from this function, but this
error is more of a "things went horribly wrong, you can't talk to the GPU"
case. Set the device to be in error.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
---
src/freedreno/vulkan/tu_drm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c
index d5eb12e701e..34b337f8e0a 100644
--- a/src/freedreno/vulkan/tu_drm.c
+++ b/src/freedreno/vulkan/tu_drm.c
@@ -866,7 +866,10 @@ tu_ResetFences(VkDevice _device, uint32_t fenceCount, const VkFence *pFences)
.handles = (uint64_t) (uintptr_t) handles,
.count_handles = fenceCount,
});
- assert(!ret);
+ if (ret) {
+ tu_device_set_lost(device, "DRM_IOCTL_SYNCOBJ_RESET failure: %s",
+ strerror(errno));
+ }
return VK_SUCCESS;
}
More information about the mesa-commit
mailing list