From 6d9503a4eb8cfc8ea013bbdf6015d8d3e96ecc17 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 1 Jun 2016 16:12:49 -0600 Subject: layers: Update docs for default dbg msg callbacks Change-Id: Ic1f192ea7c95762d7e53f091cc9f0ea55be96c04 --- layers/README.md | 14 ++++++++------ layers/vk_layer_settings.txt | 9 +++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'layers') diff --git a/layers/README.md b/layers/README.md index e2cea90d..d3eecbf1 100644 --- a/layers/README.md +++ b/layers/README.md @@ -20,12 +20,14 @@ VkDevice, VkCommandBuffer, and VkQueue. vkXXXXGetProcAddr is used internally by the Layers and Loader to initialize dispatch tables. Layers can also be activated via the VK_INSTANCE_LAYERS environment variable. -All validation layers work with the DEBUG_REPORT extension to provide the application or user with -validation feedback. When a validation layer is enabled, it will look at the vk_layer_settings.txt -file to determine its behavior. Such as outputing to a file, stdout or debug output (Windows). An -application can also register callback functions via the DEBUG_REPORT extension to receive callbacks -when the requested validation events happen. Application callbacks happen regardless of the -settings in the vk_layer_settings.txt file. +All validation layers work with the DEBUG_REPORT extension to provide validation feedback. +When a validation layer is enabled, it will look for a vk_layer_settings.txt file to define +its loggin behavior, which can include sending output to a file, stdout, or debug output (Windows). +Applications can also register debug callback functions via the DEBUG_REPORT extension to receive +callbacks when validation events occur. Application callbacks are independent of settings in a +vk_layer_settings.txt file which will be carried out separately. If no vk_layer_settings.txt +file is present and no application callbacks are registered, error messages will be output +through default logging callbacks. ### Layer library example code diff --git a/layers/vk_layer_settings.txt b/layers/vk_layer_settings.txt index d83b8326..aef2f311 100644 --- a/layers/vk_layer_settings.txt +++ b/layers/vk_layer_settings.txt @@ -1,4 +1,5 @@ # This is an example vk_layer_settings.txt file. +# # This file allows for per-layer settings which can dynamically affect layer # behavior. Comments in this file are denoted with the "#" char. # Settings lines are of the form ". = " @@ -26,6 +27,9 @@ # VK_DBG_LAYER_ACTION_CALLBACK - Call user defined callback function(s) that # have been registered via the VK_EXT_LUNARG_debug_report extension. Since # app must register callback, this is a NOOP for the settings file. +# VK_DBG_LAYER_DEBUG_OUTPUT [Windows only] - Log a txt message using the Windows +# OutputDebugString function -- messages will show up in Visual Studio output +# window, for instance. # VK_DBG_LAYER_ACTION_BREAK - Trigger a breakpoint. # # REPORT_FLAGS: @@ -33,8 +37,9 @@ # .report_flags : This is a comma-delineated list of options telling # the layer what types of messages it should report back. Options are: # info - Report informational messages -# warn - Report warnings of using the API in an unrecommended manner which may -# also lead to undefined behavior +# warn - Report warnings from using the API in a manner which may lead to undefined +# behavior or to warn the user of common trouble spots. A warning does NOT +# necessarily signify illegal application behavior. # perf - Report using the API in a way that may cause suboptimal performance # error - Report errors in API usage # debug - For layer development. Report messages for debugging layer behavior -- cgit v1.2.3