aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMark Lobodzinski <[email protected]>2016-05-19 15:27:18 -0600
committerMark Lobodzinski <[email protected]>2018-05-04 09:24:24 -0600
commit52a063d4fd94a2d969b5620b383775eacc415d0d (patch)
treeab6f999b2113e743084aae8f4c52a29e35d61524
parent43c20176c96ca1d4b96ebbbd3684050ca2986f6d (diff)
downloadVulkan-Headers-52a063d4fd94a2d969b5620b383775eacc415d0d.tar.gz
Vulkan-Headers-52a063d4fd94a2d969b5620b383775eacc415d0d.zip
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
-rw-r--r--include/vulkan/vk_layer.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h
index cf16b2b..6f49e07 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