mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 18:00:54 +00:00
Update to shipped vulkan headers
This commit is contained in:
1 parent
154161e260
commit
bf331422b1
6 files changed
+223
-240
No files matched your search
@@ -1,151 +0,0 @@
|
||||
//
|
||||
// File: vk_ext_debug_report.h
|
||||
//
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2015 Valve Corporation
|
||||
* Copyright (C) 2015 Google Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author: Cody Northrop <cody@lunarg.com>
|
||||
* Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
|
||||
* Author: Tony Barbour <tony@LunarG.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* DebugReport Vulkan Extension API
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
#define VK_EXT_debug_report 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
|
||||
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 1
|
||||
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
|
||||
|
||||
|
||||
typedef enum VkDebugReportObjectTypeEXT {
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
|
||||
} VkDebugReportObjectTypeEXT;
|
||||
|
||||
typedef enum VkDebugReportErrorEXT {
|
||||
VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
|
||||
VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
|
||||
} VkDebugReportErrorEXT;
|
||||
|
||||
|
||||
typedef enum VkDebugReportFlagBitsEXT {
|
||||
VK_DEBUG_REPORT_INFO_BIT_EXT = 0x00000001,
|
||||
VK_DEBUG_REPORT_WARN_BIT_EXT = 0x00000002,
|
||||
VK_DEBUG_REPORT_PERF_WARN_BIT_EXT = 0x00000004,
|
||||
VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
|
||||
VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
|
||||
} VkDebugReportFlagBitsEXT;
|
||||
typedef VkFlags VkDebugReportFlagsEXT;
|
||||
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
|
||||
VkDebugReportFlagsEXT flags,
|
||||
VkDebugReportObjectTypeEXT objectType,
|
||||
uint64_t object,
|
||||
size_t location,
|
||||
int32_t messageCode,
|
||||
const char* pLayerPrefix,
|
||||
const char* pMessage,
|
||||
void* pUserData);
|
||||
|
||||
|
||||
typedef struct VkDebugReportCallbackCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportFlagsEXT flags;
|
||||
PFN_vkDebugReportCallbackEXT pfnCallback;
|
||||
void* pUserData;
|
||||
} VkDebugReportCallbackCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator);
|
||||
typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(
|
||||
VkInstance instance,
|
||||
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDebugReportCallbackEXT* pCallback);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT(
|
||||
VkInstance instance,
|
||||
VkDebugReportCallbackEXT callback,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
|
||||
VkInstance instance,
|
||||
VkDebugReportFlagsEXT flags,
|
||||
VkDebugReportObjectTypeEXT objectType,
|
||||
uint64_t object,
|
||||
size_t location,
|
||||
int32_t messageCode,
|
||||
const char* pLayerPrefix,
|
||||
const char* pMessage);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
//
|
||||
// File: vk_layer.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and/or associated documentation files (the "Materials"), to
|
||||
* deal in the Materials without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice(s) and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
*
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
|
||||
* USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Need to define dispatch table
|
||||
* Core struct can then have ptr to dispatch table at the top
|
||||
* Along with object ptrs for current and next OBJ
|
||||
@@ -5,20 +34,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#include "vk_ext_debug_report.h"
|
||||
#include "vk_lunarg_debug_marker.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
# define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
# define VK_LAYER_EXPORT
|
||||
#define VK_LAYER_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef struct VkLayerDispatchTable_
|
||||
{
|
||||
typedef struct VkLayerDispatchTable_ {
|
||||
PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
|
||||
PFN_vkDestroyDevice DestroyDevice;
|
||||
PFN_vkGetDeviceQueue GetDeviceQueue;
|
||||
@@ -147,47 +172,56 @@ typedef struct VkLayerDispatchTable_
|
||||
PFN_vkQueuePresentKHR QueuePresentKHR;
|
||||
} VkLayerDispatchTable;
|
||||
|
||||
typedef struct VkLayerInstanceDispatchTable_
|
||||
{
|
||||
typedef struct VkLayerInstanceDispatchTable_ {
|
||||
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||
PFN_vkDestroyInstance DestroyInstance;
|
||||
PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
|
||||
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
|
||||
PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceImageFormatProperties
|
||||
GetPhysicalDeviceImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceSparseImageFormatProperties
|
||||
GetPhysicalDeviceSparseImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties
|
||||
GetPhysicalDeviceQueueFamilyProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
|
||||
PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
|
||||
PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
|
||||
PFN_vkDestroySurfaceKHR DestroySurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
|
||||
GetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
|
||||
GetPhysicalDeviceSurfacePresentModesKHR;
|
||||
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
|
||||
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
|
||||
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR GetPhysicalDeviceMirPresentationSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR
|
||||
GetPhysicalDeviceMirPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
|
||||
GetPhysicalDeviceWaylandPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
|
||||
GetPhysicalDeviceWin32PresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR
|
||||
GetPhysicalDeviceXcbPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR
|
||||
GetPhysicalDeviceXlibPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
|
||||
@@ -195,8 +229,7 @@ typedef struct VkLayerInstanceDispatchTable_
|
||||
} VkLayerInstanceDispatchTable;
|
||||
|
||||
// LL node for tree of dbg callback functions
|
||||
typedef struct VkLayerDbgFunctionNode_
|
||||
{
|
||||
typedef struct VkLayerDbgFunctionNode_ {
|
||||
VkDebugReportCallbackEXT msgCallback;
|
||||
PFN_vkDebugReportCallbackEXT pfnMsgCallback;
|
||||
VkFlags msgFlags;
|
||||
@@ -204,8 +237,7 @@ typedef struct VkLayerDbgFunctionNode_
|
||||
struct VkLayerDbgFunctionNode_ *pNext;
|
||||
} VkLayerDbgFunctionNode;
|
||||
|
||||
typedef enum VkLayerDbgAction_
|
||||
{
|
||||
typedef enum VkLayerDbgAction_ {
|
||||
VK_DBG_LAYER_ACTION_IGNORE = 0x0,
|
||||
VK_DBG_LAYER_ACTION_CALLBACK = 0x1,
|
||||
VK_DBG_LAYER_ACTION_LOG_MSG = 0x2,
|
||||
@@ -216,8 +248,7 @@ typedef enum VkLayerDbgAction_
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// CreateInstance and CreateDevice support structures
|
||||
|
||||
typedef enum VkLayerFunction_
|
||||
{
|
||||
typedef enum VkLayerFunction_ {
|
||||
VK_LAYER_LINK_INFO = 0,
|
||||
VK_LAYER_DEVICE_INFO = 1,
|
||||
VK_LAYER_INSTANCE_INFO = 2
|
||||
@@ -236,7 +267,7 @@ typedef struct VkLayerInstanceInfo_ {
|
||||
} VkLayerInstanceInfo;
|
||||
|
||||
typedef struct VkLayerInstanceLink_ {
|
||||
struct VkLayerInstanceLink_* pNext;
|
||||
struct VkLayerInstanceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
} VkLayerInstanceLink;
|
||||
|
||||
@@ -254,26 +285,26 @@ typedef struct VkLayerDeviceInfo_ {
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO
|
||||
const void* pNext;
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerInstanceLink* pLayerInfo;
|
||||
VkLayerInstanceLink *pLayerInfo;
|
||||
VkLayerInstanceInfo instanceInfo;
|
||||
} u;
|
||||
} VkLayerInstanceCreateInfo;
|
||||
|
||||
typedef struct VkLayerDeviceLink_ {
|
||||
struct VkLayerDeviceLink_* pNext;
|
||||
struct VkLayerDeviceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
|
||||
} VkLayerDeviceLink;
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_DEVICE_CREATE_INFO
|
||||
const void* pNext;
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerDeviceLink* pLayerInfo;
|
||||
VkLayerDeviceLink *pLayerInfo;
|
||||
VkLayerDeviceInfo deviceInfo;
|
||||
} u;
|
||||
} VkLayerDeviceCreateInfo;
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
// File: vk_lunarg_debug_marker.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**
|
||||
** Authors:
|
||||
** Jon Ashburn <jon@lunarg.com>
|
||||
** Courtney Goeltzenleuchter <courtney@lunarg.com>
|
||||
*/
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and/or associated documentation files (the "Materials"), to
|
||||
* deal in the Materials without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice(s) and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
*
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
|
||||
* USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
* Authors:
|
||||
* Jon Ashburn <jon@lunarg.com>
|
||||
* Courtney Goeltzenleuchter <courtney@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef __VK_DEBUG_MARKER_H__
|
||||
#define __VK_DEBUG_MARKER_H__
|
||||
|
||||
#include "vulkan.h"
|
||||
#include "vk_ext_debug_report.h"
|
||||
|
||||
#define VK_DEBUG_MARKER_EXTENSION_NUMBER 6
|
||||
#define VK_DEBUG_MARKER_EXTENSION_REVISION 1
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
@@ -52,42 +52,42 @@ extern "C"
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumerations
|
||||
|
||||
#define VK_DEBUG_MARKER_ENUM_EXTEND(type, id) ((type)(VK_DEBUG_MARKER_EXTENSION_NUMBER * -1000 + (id)))
|
||||
#define VK_DEBUG_MARKER_ENUM_EXTEND(type, id) \
|
||||
((type)(VK_DEBUG_MARKER_EXTENSION_NUMBER * -1000 + (id)))
|
||||
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_TAG VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 0)
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_NAME VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 1)
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_TAG \
|
||||
VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 0)
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_NAME \
|
||||
VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 1)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// API functions
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDbgMarkerBegin)(VkCommandBuffer commandBuffer, const char* pMarker);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDbgMarkerEnd)(VkCommandBuffer commandBuffer);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDbgSetObjectTag)(VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t tagSize, const void* pTag);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDbgSetObjectName)(VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object, size_t nameSize, const char* pName);
|
||||
typedef void(VKAPI_PTR *PFN_vkCmdDbgMarkerBegin)(VkCommandBuffer commandBuffer,
|
||||
const char *pMarker);
|
||||
typedef void(VKAPI_PTR *PFN_vkCmdDbgMarkerEnd)(VkCommandBuffer commandBuffer);
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkDbgSetObjectTag)(
|
||||
VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object,
|
||||
size_t tagSize, const void *pTag);
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkDbgSetObjectName)(
|
||||
VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object,
|
||||
size_t nameSize, const char *pName);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
||||
// DebugMarker extension entrypoints
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDbgMarkerBegin(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const char* pMarker);
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vkCmdDbgMarkerBegin(VkCommandBuffer commandBuffer, const char *pMarker);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDbgMarkerEnd(
|
||||
VkCommandBuffer commandBuffer);
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDbgMarkerEnd(VkCommandBuffer commandBuffer);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDbgSetObjectTag(
|
||||
VkDevice device,
|
||||
VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object,
|
||||
size_t tagSize,
|
||||
const void* pTag);
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
vkDbgSetObjectTag(VkDevice device, VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object, size_t tagSize, const void *pTag);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDbgSetObjectName(
|
||||
VkDevice device,
|
||||
VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object,
|
||||
size_t nameSize,
|
||||
const char* pName);
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
vkDbgSetObjectName(VkDevice device, VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object, size_t nameSize, const char *pName);
|
||||
|
||||
#endif // VK_NO_PROTOTYPES
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
@@ -38,11 +38,14 @@ extern "C" {
|
||||
#include "vk_platform.h"
|
||||
|
||||
#define VK_MAKE_VERSION(major, minor, patch) \
|
||||
((major << 22) | (minor << 12) | patch)
|
||||
(((major) << 22) | ((minor) << 12) | (patch))
|
||||
|
||||
// Vulkan API version supported by this file
|
||||
#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 2)
|
||||
#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 3)
|
||||
|
||||
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
|
||||
#define VK_NULL_HANDLE 0
|
||||
|
||||
@@ -3674,6 +3677,107 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
#endif
|
||||
#endif /* VK_USE_PLATFORM_WIN32_KHR */
|
||||
|
||||
#define VK_EXT_debug_report 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
|
||||
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 1
|
||||
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
|
||||
|
||||
|
||||
typedef enum VkDebugReportObjectTypeEXT {
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
|
||||
} VkDebugReportObjectTypeEXT;
|
||||
|
||||
typedef enum VkDebugReportErrorEXT {
|
||||
VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
|
||||
VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
|
||||
} VkDebugReportErrorEXT;
|
||||
|
||||
|
||||
typedef enum VkDebugReportFlagBitsEXT {
|
||||
VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
|
||||
VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
|
||||
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
|
||||
VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
|
||||
VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
|
||||
} VkDebugReportFlagBitsEXT;
|
||||
typedef VkFlags VkDebugReportFlagsEXT;
|
||||
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
|
||||
VkDebugReportFlagsEXT flags,
|
||||
VkDebugReportObjectTypeEXT objectType,
|
||||
uint64_t object,
|
||||
size_t location,
|
||||
int32_t messageCode,
|
||||
const char* pLayerPrefix,
|
||||
const char* pMessage,
|
||||
void* pUserData);
|
||||
|
||||
|
||||
typedef struct VkDebugReportCallbackCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportFlagsEXT flags;
|
||||
PFN_vkDebugReportCallbackEXT pfnCallback;
|
||||
void* pUserData;
|
||||
} VkDebugReportCallbackCreateInfoEXT;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator);
|
||||
typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(
|
||||
VkInstance instance,
|
||||
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDebugReportCallbackEXT* pCallback);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT(
|
||||
VkInstance instance,
|
||||
VkDebugReportCallbackEXT callback,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
|
||||
VkInstance instance,
|
||||
VkDebugReportFlagsEXT flags,
|
||||
VkDebugReportObjectTypeEXT objectType,
|
||||
uint64_t object,
|
||||
size_t location,
|
||||
int32_t messageCode,
|
||||
const char* pLayerPrefix,
|
||||
const char* pMessage);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
#include "official/vulkan.h"
|
||||
#include "official/vk_lunarg_debug_marker.h"
|
||||
#include "official/vk_ext_debug_report.h"
|
||||
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ void WrappedVulkan::Initialise(VkInitParams ¶ms)
|
||||
debugInfo.pNext = NULL;
|
||||
debugInfo.pfnCallback = &DebugCallbackStatic;
|
||||
debugInfo.pUserData = this;
|
||||
debugInfo.flags = VK_DEBUG_REPORT_WARN_BIT_EXT|VK_DEBUG_REPORT_PERF_WARN_BIT_EXT|VK_DEBUG_REPORT_ERROR_BIT_EXT;
|
||||
debugInfo.flags = VK_DEBUG_REPORT_WARNING_BIT_EXT|VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT|VK_DEBUG_REPORT_ERROR_BIT_EXT;
|
||||
|
||||
ObjDisp(m_Instance)->CreateDebugReportCallbackEXT(Unwrap(m_Instance), &debugInfo, NULL, &m_DbgMsgCallback);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user