diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-05-19 15:27:18 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-06-06 09:27:36 -0600 |
| commit | 849ffee6d36b3f7c6e6723c4b62f56822c3741e5 (patch) | |
| tree | ee82841350313cee425091b7ca2d0fe2f65b77f4 /include/vulkan | |
| parent | 2ffbfd804be77580c5bab991d2715eecf1346128 (diff) | |
| download | usermoji-849ffee6d36b3f7c6e6723c4b62f56822c3741e5.tar.xz | |
layers: Add default layer error message config
Allows layers to output error messages even if no vk_layer_settings.txt
config file is present. Sets defaults to LOG_MSG, error, stdout.
A layer settings file will override any default values. If no settings
file is present and an app creates a debug callback, the default
callbacks will be removed and unregistered.
Change-Id: I49f37189665816df58c258b9e9629f2bf76751c8
Diffstat (limited to 'include/vulkan')
| -rw-r--r-- | include/vulkan/vk_layer.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h index cf16b2b7..6f49e07f 100644 --- a/include/vulkan/vk_layer.h +++ b/include/vulkan/vk_layer.h @@ -234,22 +234,28 @@ typedef struct VkLayerInstanceDispatchTable_ { CreateDisplayPlaneSurfaceKHR; } VkLayerInstanceDispatchTable; + // LL node for tree of dbg callback functions typedef struct VkLayerDbgFunctionNode_ { VkDebugReportCallbackEXT msgCallback; PFN_vkDebugReportCallbackEXT pfnMsgCallback; VkFlags msgFlags; void *pUserData; + bool default_callback; struct VkLayerDbgFunctionNode_ *pNext; } VkLayerDbgFunctionNode; -typedef enum VkLayerDbgAction_ { - VK_DBG_LAYER_ACTION_IGNORE = 0x0, - VK_DBG_LAYER_ACTION_CALLBACK = 0x1, - VK_DBG_LAYER_ACTION_LOG_MSG = 0x2, - VK_DBG_LAYER_ACTION_BREAK = 0x4, - VK_DBG_LAYER_ACTION_DEBUG_OUTPUT = 0x8, -} VkLayerDbgAction; +// TODO: Move debug action definitions out of this header file +// Definitions for Debug Actions +typedef enum VkLayerDbgActionBits { + VK_DBG_LAYER_ACTION_IGNORE = 0x00000000, + VK_DBG_LAYER_ACTION_CALLBACK = 0x00000001, + VK_DBG_LAYER_ACTION_LOG_MSG = 0x00000002, + VK_DBG_LAYER_ACTION_BREAK = 0x00000004, + VK_DBG_LAYER_ACTION_DEBUG_OUTPUT = 0x00000008, + VK_DBG_LAYER_ACTION_DEFAULT = 0x40000000, +} VkLayerDbgActionBits; +typedef VkFlags VkLayerDbgActionFlags; // ------------------------------------------------------------------------------------------------ // CreateInstance and CreateDevice support structures |
