From 07cd22290f52ac4e93ef7579391d7d670868bc58 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Tue, 8 Sep 2015 17:27:30 -0600 Subject: 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. --- include/vk_debug_report_lunarg.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3