Mesa (master): zink: Use mesa_loge() for should-never-be-reached initialization errors.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 23 18:13:50 UTC 2021
Module: Mesa
Branch: master
Commit: c43e8da5350a1103c7b0bb71e4c6dec6b9ef8d61
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c43e8da5350a1103c7b0bb71e4c6dec6b9ef8d61
Author: Eric Anholt <eric at anholt.net>
Date: Thu Feb 18 22:07:56 2021 -0800
zink: Use mesa_loge() for should-never-be-reached initialization errors.
dEQP in CI was hitting these, and debug_printf is not enabled on non-debug
(such as debugoptimized or release) builds. Besides, mesa_loge() gets you
logging on Android, should someone ever do zink for that.
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8891>
---
src/gallium/drivers/zink/zink_screen.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h
index 434bdb1cf20..c4f67c65e89 100644
--- a/src/gallium/drivers/zink/zink_screen.h
+++ b/src/gallium/drivers/zink/zink_screen.h
@@ -31,6 +31,7 @@
#include "util/slab.h"
#include "compiler/nir/nir.h"
#include "util/disk_cache.h"
+#include "util/log.h"
#include <vulkan/vulkan.h>
@@ -136,7 +137,7 @@ zink_is_depth_format_supported(struct zink_screen *screen, VkFormat format);
#define GET_PROC_ADDR(x) do { \
screen->vk_##x = (PFN_vk##x)vkGetDeviceProcAddr(screen->dev, "vk"#x); \
if (!screen->vk_##x) { \
- debug_printf("vkGetDeviceProcAddr failed: vk"#x"\n"); \
+ mesa_loge("ZINK: vkGetDeviceProcAddr failed: vk"#x"\n"); \
return false; \
} \
} while (0)
@@ -144,7 +145,7 @@ zink_is_depth_format_supported(struct zink_screen *screen, VkFormat format);
#define GET_PROC_ADDR_INSTANCE(x) do { \
screen->vk_##x = (PFN_vk##x)vkGetInstanceProcAddr(screen->instance, "vk"#x); \
if (!screen->vk_##x) { \
- debug_printf("GetInstanceProcAddr failed: vk"#x"\n"); \
+ mesa_loge("ZINK: GetInstanceProcAddr failed: vk"#x"\n"); \
return false; \
} \
} while (0)
More information about the mesa-commit
mailing list