diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-05-24 16:04:56 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-06-06 09:27:36 -0600 |
| commit | 7e03b1a0efe5f2bf6ec16980c9d2a6027b227bb7 (patch) | |
| tree | 4acf14eb38662ad27f0fcb821215155279f1d44d | |
| parent | 849ffee6d36b3f7c6e6723c4b62f56822c3741e5 (diff) | |
| download | usermoji-7e03b1a0efe5f2bf6ec16980c9d2a6027b227bb7.tar.xz | |
layers: Move debug action enums from vk_layer.h
Moved debug-report related items from vk_layer.h. Enums are now in
vk_layer_logging.h and DbgFunctionNode has been moved into a new
loader header file vk_loader_layer.h.
Change-Id: I6031146ba474ff01ca039da44ad5d42d054383a3
| -rw-r--r-- | include/vulkan/vk_layer.h | 23 | ||||
| -rw-r--r-- | layers/vk_layer_config.h | 11 | ||||
| -rw-r--r-- | layers/vk_layer_logging.h | 1 | ||||
| -rw-r--r-- | loader/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | loader/loader.h | 3 | ||||
| -rw-r--r-- | loader/vk_loader_layer.h | 32 |
6 files changed, 47 insertions, 24 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h index 6f49e07f..8b7d82fb 100644 --- a/include/vulkan/vk_layer.h +++ b/include/vulkan/vk_layer.h @@ -234,29 +234,6 @@ 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; - -// 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 diff --git a/layers/vk_layer_config.h b/layers/vk_layer_config.h index 8530a977..c4526dbc 100644 --- a/layers/vk_layer_config.h +++ b/layers/vk_layer_config.h @@ -28,6 +28,17 @@ extern "C" { #endif +// 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; + const std::unordered_map<std::string, VkFlags> debug_actions_option_definitions = { {std::string("VK_DBG_LAYER_ACTION_IGNORE"), VK_DBG_LAYER_ACTION_IGNORE}, {std::string("VK_DBG_LAYER_ACTION_CALLBACK"), VK_DBG_LAYER_ACTION_CALLBACK}, diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index cb4c44c7..0328031f 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -22,6 +22,7 @@ #ifndef LAYER_LOGGING_H #define LAYER_LOGGING_H +#include "vk_loader_layer.h" #include "vk_layer_config.h" #include "vk_layer_data.h" #include "vk_layer_table.h" diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index f47ee589..15577b8a 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -17,6 +17,7 @@ set(NORMAL_LOADER_SRCS loader.c loader.h vk_loader_platform.h + vk_loader_layer.h trampoline.c wsi.c wsi.h diff --git a/loader/loader.h b/loader/loader.h index 95803c01..ecc945ed 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -30,8 +30,9 @@ #include <vulkan/vulkan.h> #include "vk_loader_platform.h" - +#include "vk_loader_layer.h" #include <vulkan/vk_layer.h> + #include <vulkan/vk_icd.h> #include <assert.h> diff --git a/loader/vk_loader_layer.h b/loader/vk_loader_layer.h new file mode 100644 index 00000000..2207c029 --- /dev/null +++ b/loader/vk_loader_layer.h @@ -0,0 +1,32 @@ +/* +* +* Copyright (c) 2016 The Khronos Group Inc. +* Copyright (c) 2016 Valve Corporation +* Copyright (c) 2016 LunarG, Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Author: Mark Lobodzinski <mark@lunarg.com> +* +*/ +#pragma once + +// Linked list node for tree of debug callback functions +typedef struct VkLayerDbgFunctionNode_ { + VkDebugReportCallbackEXT msgCallback; + PFN_vkDebugReportCallbackEXT pfnMsgCallback; + VkFlags msgFlags; + void *pUserData; + struct VkLayerDbgFunctionNode_ *pNext; +} VkLayerDbgFunctionNode; + |
