aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2015-09-08 17:27:30 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-09-10 10:40:37 -0600
commit07cd22290f52ac4e93ef7579391d7d670868bc58 (patch)
treea5b71dab0eb94c2da7b4aceb9a5f7be2cd9c847e
parent8cda44ec592d8f2394dc59725feb3237968d8d16 (diff)
downloadusermoji-07cd22290f52ac4e93ef7579391d7d670868bc58.tar.xz
vulkan: Add validation error result
When running with validation layers a validation layer may abort an API call (due to app callback indicating so). Since there are no validation error codes in vulkan.h we need to define one here to return for such cases. Details of the validation failure are available via the DEBUG_REPORT callback.
-rw-r--r--include/vk_debug_report_lunarg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/vk_debug_report_lunarg.h b/include/vk_debug_report_lunarg.h
index fb5033cf..5d6dcaee 100644
--- a/include/vk_debug_report_lunarg.h
+++ b/include/vk_debug_report_lunarg.h
@@ -113,6 +113,8 @@ typedef enum _DEBUG_REPORT_ERROR
#define VK_DEBUG_REPORT_ENUM_EXTEND(type, id) ((type)(VK_DEBUG_REPORT_EXTENSION_NUMBER * -1000 + (id)))
#define VK_OBJECT_TYPE_MSG_CALLBACK VK_DEBUG_REPORT_ENUM_EXTEND(VkDbgObjectType, 0)
+#define VK_ERROR_VALIDATION_FAILED VK_DEBUG_REPORT_ENUM_EXTEND(VkResult, 0)
+
// ------------------------------------------------------------------------------------------------
// Vulkan function pointers