[gtk+/wip/gbsneto/vulkan-wayland] vulkancontext: Properly abort validation layer output
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gbsneto/vulkan-wayland] vulkancontext: Properly abort validation layer output
- Date: Fri, 6 Jan 2017 03:41:57 +0000 (UTC)
commit 1d56c3007e67fdc23ed01df658acec08e7aba286
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jan 6 01:35:19 2017 -0200
vulkancontext: Properly abort validation layer output
By setting the abort flag to VK_TRUE on critical errors,
it's easier to inspect errors with the validation layers.
gdk/gdkvulkancontext.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c
index 9d90446..0be11c1 100644
--- a/gdk/gdkvulkancontext.c
+++ b/gdk/gdkvulkancontext.c
@@ -677,13 +677,17 @@ gdk_vulkan_debug_report (VkDebugReportFlagsEXT flags,
const char* pMessage,
void* pUserData)
{
+ VkBool32 should_abort = VK_FALSE;
+
if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT)
{
g_critical ("Vulkan: %s: %s\n", pLayerPrefix, pMessage);
+ should_abort = VK_TRUE;
}
else if (flags & VK_DEBUG_REPORT_WARNING_BIT_EXT)
{
g_critical ("Vulkan: %s: %s\n", pLayerPrefix, pMessage);
+ should_abort = VK_TRUE;
}
else if (flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT)
{
@@ -698,7 +702,7 @@ gdk_vulkan_debug_report (VkDebugReportFlagsEXT flags,
g_message ("Vulkan: %s: %s\n", pLayerPrefix, pMessage);
}
- return VK_TRUE;
+ return should_abort;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]