include: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.h
authorTobin Ehlis <tobin@lunarg.com>
Fri, 3 Jul 2015 15:42:57 +0000 (09:42 -0600)
committerTobin Ehlis <tobin@lunarg.com>
Tue, 7 Jul 2015 14:45:20 +0000 (08:45 -0600)
25 files changed:
icd/nulldrv/nulldrv.h
include/vkIcd.h [deleted file]
include/vkLayer.h [deleted file]
include/vk_debug_marker_layer.h
include/vk_icd.h [new file with mode: 0644]
include/vk_layer.h [new file with mode: 0644]
layers/basic.cpp
layers/draw_state.h
layers/image.cpp
layers/layer_logging.h
layers/layers_config.cpp
layers/layers_msg.h
layers/layers_table.cpp
layers/mem_tracker.h
layers/multi.cpp
layers/object_track.h
layers/param_checker.cpp
layers/shader_checker.cpp
layers/shader_checker.h
loader/debug_report.c
loader/loader.c
loader/loader.h
loader/table_ops.h
vk-generate.py
vk-layer-generate.py

index 6f3158c2690ae92796169098c6e4ea23e206bf44..9931b39161084b8ce43421b138ae0a23ae756425 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <vulkan.h>
 #include <vk_debug_report_lunarg.h>
-#include <vkIcd.h>
+#include <vk_icd.h>
 #include <vk_wsi_lunarg.h>
 
 #include "icd.h"
diff --git a/include/vkIcd.h b/include/vkIcd.h
deleted file mode 100644 (file)
index 8f1bfdb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef VKICD_H
-#define VKICD_H
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "vk_platform.h"
-
-/*
- * The ICD must reserve space for a pointer for the loader's dispatch
- * table, at the start of <each object>.
- * The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
- */
-
-#define ICD_LOADER_MAGIC   0x01CDC0DE
-
-typedef union _VK_LOADER_DATA {
-  uint32_t loaderMagic;
-  void *loaderData;
-} VK_LOADER_DATA;
-
-static inline void set_loader_magic_value(VkObject pNewObject) {
-    VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *) pNewObject;
-    loader_info->loaderMagic = ICD_LOADER_MAGIC;
-}
-
-static inline bool valid_loader_magic_value(VkObject pNewObject) {
-    const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *) pNewObject;
-    return loader_info->loaderMagic == ICD_LOADER_MAGIC;
-}
-
-#endif // VKICD_H
-
diff --git a/include/vkLayer.h b/include/vkLayer.h
deleted file mode 100644 (file)
index 85c41d6..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/* 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
- */
-#pragma once
-
-#include "vulkan.h"
-#include "vk_debug_report_lunarg.h"
-#include "vk_debug_marker_lunarg.h"
-#include "vk_wsi_lunarg.h"
-#include "vk_wsi_lunarg.h"
-#if defined(__GNUC__) && __GNUC__ >= 4
-#  define VK_LAYER_EXPORT __attribute__((visibility("default")))
-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
-#  define VK_LAYER_EXPORT __attribute__((visibility("default")))
-#else
-#  define VK_LAYER_EXPORT
-#endif
-
-typedef void * (*PFN_vkGPA)(VkObject obj, const char * pName);
-typedef struct VkBaseLayerObject_
-{
-    PFN_vkGPA pGPA;
-    VkObject nextObject;
-    VkObject baseObject;
-} VkBaseLayerObject;
-
-typedef struct VkLayerDispatchTable_
-{
-    PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
-    PFN_vkCreateDevice CreateDevice;
-    PFN_vkDestroyDevice DestroyDevice;
-    PFN_vkGetDeviceQueue GetDeviceQueue;
-    PFN_vkQueueSubmit QueueSubmit;
-    PFN_vkQueueWaitIdle QueueWaitIdle;
-    PFN_vkDeviceWaitIdle DeviceWaitIdle;
-    PFN_vkAllocMemory AllocMemory;
-    PFN_vkFreeMemory FreeMemory;
-    PFN_vkMapMemory MapMemory;
-    PFN_vkUnmapMemory UnmapMemory;
-    PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges;
-    PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges;
-    PFN_vkDestroyObject DestroyObject;
-    PFN_vkGetObjectMemoryRequirements GetObjectMemoryRequirements;
-    PFN_vkBindObjectMemory BindObjectMemory;
-    PFN_vkQueueBindSparseBufferMemory QueueBindSparseBufferMemory;
-    PFN_vkQueueBindSparseImageMemory QueueBindSparseImageMemory;
-    PFN_vkCreateFence CreateFence;
-    PFN_vkGetFenceStatus GetFenceStatus;
-    PFN_vkResetFences ResetFences;
-    PFN_vkWaitForFences WaitForFences;
-    PFN_vkCreateSemaphore CreateSemaphore;
-    PFN_vkQueueSignalSemaphore QueueSignalSemaphore;
-    PFN_vkQueueWaitSemaphore QueueWaitSemaphore;
-    PFN_vkCreateEvent CreateEvent;
-    PFN_vkGetEventStatus GetEventStatus;
-    PFN_vkSetEvent SetEvent;
-    PFN_vkResetEvent ResetEvent;
-    PFN_vkCreateQueryPool CreateQueryPool;
-    PFN_vkGetQueryPoolResults GetQueryPoolResults;
-    PFN_vkCreateBuffer CreateBuffer;
-    PFN_vkCreateBufferView CreateBufferView;
-    PFN_vkCreateImage CreateImage;
-    PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout;
-    PFN_vkCreateImageView CreateImageView;
-    PFN_vkCreateColorAttachmentView CreateColorAttachmentView;
-    PFN_vkCreateDepthStencilView CreateDepthStencilView;
-    PFN_vkCreateShaderModule CreateShaderModule;
-    PFN_vkCreateShader CreateShader;
-    PFN_vkCreateGraphicsPipeline CreateGraphicsPipeline;
-    PFN_vkCreateGraphicsPipelineDerivative CreateGraphicsPipelineDerivative;
-    PFN_vkCreateComputePipeline CreateComputePipeline;
-    PFN_vkStorePipeline StorePipeline;
-    PFN_vkLoadPipeline LoadPipeline;
-    PFN_vkLoadPipelineDerivative LoadPipelineDerivative;
-    PFN_vkCreatePipelineLayout CreatePipelineLayout;
-    PFN_vkCreateSampler CreateSampler;
-    PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout;
-    PFN_vkCreateDescriptorPool CreateDescriptorPool;
-    PFN_vkResetDescriptorPool ResetDescriptorPool;
-    PFN_vkAllocDescriptorSets AllocDescriptorSets;
-    PFN_vkUpdateDescriptorSets UpdateDescriptorSets;
-    PFN_vkCreateDynamicViewportState CreateDynamicViewportState;
-    PFN_vkCreateDynamicRasterState CreateDynamicRasterState;
-    PFN_vkCreateDynamicColorBlendState CreateDynamicColorBlendState;
-    PFN_vkCreateDynamicDepthStencilState CreateDynamicDepthStencilState;
-    PFN_vkCreateCommandBuffer CreateCommandBuffer;
-    PFN_vkBeginCommandBuffer BeginCommandBuffer;
-    PFN_vkEndCommandBuffer EndCommandBuffer;
-    PFN_vkResetCommandBuffer ResetCommandBuffer;
-    PFN_vkCmdBindPipeline CmdBindPipeline;
-    PFN_vkCmdBindDynamicStateObject CmdBindDynamicStateObject;
-    PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets;
-    PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
-    PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
-    PFN_vkCmdDraw CmdDraw;
-    PFN_vkCmdDrawIndexed CmdDrawIndexed;
-    PFN_vkCmdDrawIndirect CmdDrawIndirect;
-    PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect;
-    PFN_vkCmdDispatch CmdDispatch;
-    PFN_vkCmdDispatchIndirect CmdDispatchIndirect;
-    PFN_vkCmdCopyBuffer CmdCopyBuffer;
-    PFN_vkCmdCopyImage CmdCopyImage;
-    PFN_vkCmdBlitImage CmdBlitImage;
-    PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage;
-    PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer;
-    PFN_vkCmdUpdateBuffer CmdUpdateBuffer;
-    PFN_vkCmdFillBuffer CmdFillBuffer;
-    PFN_vkCmdClearColorImage CmdClearColorImage;
-    PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage;
-    PFN_vkCmdClearColorAttachment CmdClearColorAttachment;
-    PFN_vkCmdClearDepthStencilAttachment CmdClearDepthStencilAttachment;
-    PFN_vkCmdResolveImage CmdResolveImage;
-    PFN_vkCmdSetEvent CmdSetEvent;
-    PFN_vkCmdResetEvent CmdResetEvent;
-    PFN_vkCmdWaitEvents CmdWaitEvents;
-    PFN_vkCmdPipelineBarrier CmdPipelineBarrier;
-    PFN_vkCmdBeginQuery CmdBeginQuery;
-    PFN_vkCmdEndQuery CmdEndQuery;
-    PFN_vkCmdResetQueryPool CmdResetQueryPool;
-    PFN_vkCmdWriteTimestamp CmdWriteTimestamp;
-    PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults;
-    PFN_vkCreateFramebuffer CreateFramebuffer;
-    PFN_vkCreateRenderPass CreateRenderPass;
-    PFN_vkCmdBeginRenderPass CmdBeginRenderPass;
-    PFN_vkCmdEndRenderPass CmdEndRenderPass;
-    PFN_vkCmdExecuteCommands CmdExecuteCommands;
-    PFN_vkCreateSwapChainWSI CreateSwapChainWSI;
-    PFN_vkDestroySwapChainWSI DestroySwapChainWSI;
-    PFN_vkGetSwapChainInfoWSI GetSwapChainInfoWSI;
-    PFN_vkQueuePresentWSI QueuePresentWSI;
-    PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
-    PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
-    PFN_vkDbgStringCallback DbgStringCallback;
-    PFN_vkDbgStdioCallback DbgStdioCallback;
-    PFN_vkDbgBreakCallback DbgBreakCallback;
-} VkLayerDispatchTable;
-
-typedef struct VkLayerInstanceDispatchTable_
-{
-    PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
-    PFN_vkCreateInstance CreateInstance;
-    PFN_vkDestroyInstance DestroyInstance;
-    PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
-    PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
-    PFN_vkGetPhysicalDeviceFormatInfo GetPhysicalDeviceFormatInfo;
-    PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits;
-    PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
-    PFN_vkGetPhysicalDevicePerformance GetPhysicalDevicePerformance;
-    PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount;
-    PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties;
-    PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
-    PFN_vkGetPhysicalDeviceExtensionCount GetPhysicalDeviceExtensionCount;
-    PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
-    PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
-    PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
-    PFN_vkDbgStringCallback DbgStringCallback;
-    PFN_vkDbgStdioCallback DbgStdioCallback;
-    PFN_vkDbgBreakCallback DbgBreakCallback;
-} VkLayerInstanceDispatchTable;
-
-// LL node for tree of dbg callback functions
-typedef struct VkLayerDbgFunctionNode_
-{
-    VkDbgMsgCallback msgCallback;
-    PFN_vkDbgMsgCallback pfnMsgCallback;
-    VkFlags msgFlags;
-    const void *pUserData;
-    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
-} VkLayerDbgAction;
-
-// ------------------------------------------------------------------------------------------------
-// API functions
index 6de0ebf866b92bc797acf17df7d750f32f7b6961..d9b1d7da5ec8a980fc77b8c081a1e0012e420d3c 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "vulkan.h"
 #include "vk_debug_marker_lunarg.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 
 
 typedef struct VkLayerDebugMarkerDispatchTable_
diff --git a/include/vk_icd.h b/include/vk_icd.h
new file mode 100644 (file)
index 0000000..8f1bfdb
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef VKICD_H
+#define VKICD_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "vk_platform.h"
+
+/*
+ * The ICD must reserve space for a pointer for the loader's dispatch
+ * table, at the start of <each object>.
+ * The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
+ */
+
+#define ICD_LOADER_MAGIC   0x01CDC0DE
+
+typedef union _VK_LOADER_DATA {
+  uint32_t loaderMagic;
+  void *loaderData;
+} VK_LOADER_DATA;
+
+static inline void set_loader_magic_value(VkObject pNewObject) {
+    VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *) pNewObject;
+    loader_info->loaderMagic = ICD_LOADER_MAGIC;
+}
+
+static inline bool valid_loader_magic_value(VkObject pNewObject) {
+    const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *) pNewObject;
+    return loader_info->loaderMagic == ICD_LOADER_MAGIC;
+}
+
+#endif // VKICD_H
+
diff --git a/include/vk_layer.h b/include/vk_layer.h
new file mode 100644 (file)
index 0000000..85c41d6
--- /dev/null
@@ -0,0 +1,181 @@
+/* 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
+ */
+#pragma once
+
+#include "vulkan.h"
+#include "vk_debug_report_lunarg.h"
+#include "vk_debug_marker_lunarg.h"
+#include "vk_wsi_lunarg.h"
+#include "vk_wsi_lunarg.h"
+#if defined(__GNUC__) && __GNUC__ >= 4
+#  define VK_LAYER_EXPORT __attribute__((visibility("default")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#  define VK_LAYER_EXPORT __attribute__((visibility("default")))
+#else
+#  define VK_LAYER_EXPORT
+#endif
+
+typedef void * (*PFN_vkGPA)(VkObject obj, const char * pName);
+typedef struct VkBaseLayerObject_
+{
+    PFN_vkGPA pGPA;
+    VkObject nextObject;
+    VkObject baseObject;
+} VkBaseLayerObject;
+
+typedef struct VkLayerDispatchTable_
+{
+    PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
+    PFN_vkCreateDevice CreateDevice;
+    PFN_vkDestroyDevice DestroyDevice;
+    PFN_vkGetDeviceQueue GetDeviceQueue;
+    PFN_vkQueueSubmit QueueSubmit;
+    PFN_vkQueueWaitIdle QueueWaitIdle;
+    PFN_vkDeviceWaitIdle DeviceWaitIdle;
+    PFN_vkAllocMemory AllocMemory;
+    PFN_vkFreeMemory FreeMemory;
+    PFN_vkMapMemory MapMemory;
+    PFN_vkUnmapMemory UnmapMemory;
+    PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges;
+    PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges;
+    PFN_vkDestroyObject DestroyObject;
+    PFN_vkGetObjectMemoryRequirements GetObjectMemoryRequirements;
+    PFN_vkBindObjectMemory BindObjectMemory;
+    PFN_vkQueueBindSparseBufferMemory QueueBindSparseBufferMemory;
+    PFN_vkQueueBindSparseImageMemory QueueBindSparseImageMemory;
+    PFN_vkCreateFence CreateFence;
+    PFN_vkGetFenceStatus GetFenceStatus;
+    PFN_vkResetFences ResetFences;
+    PFN_vkWaitForFences WaitForFences;
+    PFN_vkCreateSemaphore CreateSemaphore;
+    PFN_vkQueueSignalSemaphore QueueSignalSemaphore;
+    PFN_vkQueueWaitSemaphore QueueWaitSemaphore;
+    PFN_vkCreateEvent CreateEvent;
+    PFN_vkGetEventStatus GetEventStatus;
+    PFN_vkSetEvent SetEvent;
+    PFN_vkResetEvent ResetEvent;
+    PFN_vkCreateQueryPool CreateQueryPool;
+    PFN_vkGetQueryPoolResults GetQueryPoolResults;
+    PFN_vkCreateBuffer CreateBuffer;
+    PFN_vkCreateBufferView CreateBufferView;
+    PFN_vkCreateImage CreateImage;
+    PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout;
+    PFN_vkCreateImageView CreateImageView;
+    PFN_vkCreateColorAttachmentView CreateColorAttachmentView;
+    PFN_vkCreateDepthStencilView CreateDepthStencilView;
+    PFN_vkCreateShaderModule CreateShaderModule;
+    PFN_vkCreateShader CreateShader;
+    PFN_vkCreateGraphicsPipeline CreateGraphicsPipeline;
+    PFN_vkCreateGraphicsPipelineDerivative CreateGraphicsPipelineDerivative;
+    PFN_vkCreateComputePipeline CreateComputePipeline;
+    PFN_vkStorePipeline StorePipeline;
+    PFN_vkLoadPipeline LoadPipeline;
+    PFN_vkLoadPipelineDerivative LoadPipelineDerivative;
+    PFN_vkCreatePipelineLayout CreatePipelineLayout;
+    PFN_vkCreateSampler CreateSampler;
+    PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout;
+    PFN_vkCreateDescriptorPool CreateDescriptorPool;
+    PFN_vkResetDescriptorPool ResetDescriptorPool;
+    PFN_vkAllocDescriptorSets AllocDescriptorSets;
+    PFN_vkUpdateDescriptorSets UpdateDescriptorSets;
+    PFN_vkCreateDynamicViewportState CreateDynamicViewportState;
+    PFN_vkCreateDynamicRasterState CreateDynamicRasterState;
+    PFN_vkCreateDynamicColorBlendState CreateDynamicColorBlendState;
+    PFN_vkCreateDynamicDepthStencilState CreateDynamicDepthStencilState;
+    PFN_vkCreateCommandBuffer CreateCommandBuffer;
+    PFN_vkBeginCommandBuffer BeginCommandBuffer;
+    PFN_vkEndCommandBuffer EndCommandBuffer;
+    PFN_vkResetCommandBuffer ResetCommandBuffer;
+    PFN_vkCmdBindPipeline CmdBindPipeline;
+    PFN_vkCmdBindDynamicStateObject CmdBindDynamicStateObject;
+    PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets;
+    PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
+    PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
+    PFN_vkCmdDraw CmdDraw;
+    PFN_vkCmdDrawIndexed CmdDrawIndexed;
+    PFN_vkCmdDrawIndirect CmdDrawIndirect;
+    PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect;
+    PFN_vkCmdDispatch CmdDispatch;
+    PFN_vkCmdDispatchIndirect CmdDispatchIndirect;
+    PFN_vkCmdCopyBuffer CmdCopyBuffer;
+    PFN_vkCmdCopyImage CmdCopyImage;
+    PFN_vkCmdBlitImage CmdBlitImage;
+    PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage;
+    PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer;
+    PFN_vkCmdUpdateBuffer CmdUpdateBuffer;
+    PFN_vkCmdFillBuffer CmdFillBuffer;
+    PFN_vkCmdClearColorImage CmdClearColorImage;
+    PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage;
+    PFN_vkCmdClearColorAttachment CmdClearColorAttachment;
+    PFN_vkCmdClearDepthStencilAttachment CmdClearDepthStencilAttachment;
+    PFN_vkCmdResolveImage CmdResolveImage;
+    PFN_vkCmdSetEvent CmdSetEvent;
+    PFN_vkCmdResetEvent CmdResetEvent;
+    PFN_vkCmdWaitEvents CmdWaitEvents;
+    PFN_vkCmdPipelineBarrier CmdPipelineBarrier;
+    PFN_vkCmdBeginQuery CmdBeginQuery;
+    PFN_vkCmdEndQuery CmdEndQuery;
+    PFN_vkCmdResetQueryPool CmdResetQueryPool;
+    PFN_vkCmdWriteTimestamp CmdWriteTimestamp;
+    PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults;
+    PFN_vkCreateFramebuffer CreateFramebuffer;
+    PFN_vkCreateRenderPass CreateRenderPass;
+    PFN_vkCmdBeginRenderPass CmdBeginRenderPass;
+    PFN_vkCmdEndRenderPass CmdEndRenderPass;
+    PFN_vkCmdExecuteCommands CmdExecuteCommands;
+    PFN_vkCreateSwapChainWSI CreateSwapChainWSI;
+    PFN_vkDestroySwapChainWSI DestroySwapChainWSI;
+    PFN_vkGetSwapChainInfoWSI GetSwapChainInfoWSI;
+    PFN_vkQueuePresentWSI QueuePresentWSI;
+    PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
+    PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
+    PFN_vkDbgStringCallback DbgStringCallback;
+    PFN_vkDbgStdioCallback DbgStdioCallback;
+    PFN_vkDbgBreakCallback DbgBreakCallback;
+} VkLayerDispatchTable;
+
+typedef struct VkLayerInstanceDispatchTable_
+{
+    PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
+    PFN_vkCreateInstance CreateInstance;
+    PFN_vkDestroyInstance DestroyInstance;
+    PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
+    PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
+    PFN_vkGetPhysicalDeviceFormatInfo GetPhysicalDeviceFormatInfo;
+    PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits;
+    PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
+    PFN_vkGetPhysicalDevicePerformance GetPhysicalDevicePerformance;
+    PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount;
+    PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties;
+    PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
+    PFN_vkGetPhysicalDeviceExtensionCount GetPhysicalDeviceExtensionCount;
+    PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
+    PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
+    PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
+    PFN_vkDbgStringCallback DbgStringCallback;
+    PFN_vkDbgStdioCallback DbgStdioCallback;
+    PFN_vkDbgBreakCallback DbgBreakCallback;
+} VkLayerInstanceDispatchTable;
+
+// LL node for tree of dbg callback functions
+typedef struct VkLayerDbgFunctionNode_
+{
+    VkDbgMsgCallback msgCallback;
+    PFN_vkDbgMsgCallback pfnMsgCallback;
+    VkFlags msgFlags;
+    const void *pUserData;
+    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
+} VkLayerDbgAction;
+
+// ------------------------------------------------------------------------------------------------
+// API functions
index de2755b2342c278734439de6cc377cd4ef62f777..b9bf17dfc229b08771bef2a7581aae0052ff646c 100644 (file)
@@ -26,7 +26,7 @@
 #include <assert.h>
 #include "loader_platform.h"
 #include "vk_dispatch_table_helper.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layers_table.h"
 // The following is #included again to catch certain OS-specific functions
 // being used:
index c46a28a546e2701b4441a9c8b2a7ac04320da68b..fb62fb10f2118f305f0e50b366ae174d16011861 100644 (file)
@@ -21,7 +21,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include <vector>
 
 using namespace std;
index d2c449ec9d7c562b1112af9016ee0a633e430d57..8012e9ba43aa844c4f4803555560a626e4fc3307 100644 (file)
@@ -32,7 +32,7 @@
 #include <unordered_map>
 
 #include "loader_platform.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layers_config.h"
 #include "vk_enum_validate_helper.h"
 #include "vk_struct_validate_helper.h"
index 68f5f89b1ca8d16fb013008b5f26e101e5e12ca9..8a7e2929e6d36e8328e654aba977587e80a571c7 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdarg.h>
 #include <stdbool.h>
 #include <unordered_map>
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layer_data.h"
 #include "layers_table.h"
 
index 642e0b49b63bdde490d5e291a0e91112666f7231..ad49e4d34a8f61beb21a94e3999c3ba27cbdbae5 100644 (file)
@@ -26,7 +26,7 @@
 #include <string>
 #include <map>
 #include <string.h>
-#include <vkLayer.h>
+#include <vk_layer.h>
 #include "loader_platform.h"
 #include "layers_config.h"
 // The following is #included again to catch certain OS-specific functions
index f73e4d3d595b82a5e4d9399e674c24cf16fa03f9..2d0e31d6290f67a58ce71cb9b4332ad1b726efbc 100644 (file)
@@ -23,7 +23,7 @@
  */
 #include <stdio.h>
 #include <stdbool.h>
-#include "vkLayer.h"
+#include "vk_layer.h"
 
 static VkLayerDbgFunctionNode *g_pDbgFunctionHead = NULL;
 static VkFlags g_reportFlags = (VkFlags) 0;
index 5d1b9cf9656e318be23972ad84df437532880dc2..363cd01b9c22a9e59fb2f064ebc6c939a4d9e781 100644 (file)
@@ -24,7 +24,7 @@
 #include <assert.h>
 #include <unordered_map>
 #include "vk_dispatch_table_helper.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layers_table.h"
 static device_table_map tableMap;
 static instance_table_map tableInstanceMap;
index c7083adb78f4b07d3b4344a3c833979ad81d6be6..8caf0084d398291e4d07a026ad0c543664d3cde5 100644 (file)
@@ -23,7 +23,7 @@
  */
 #pragma once
 #include <vector>
-#include "vkLayer.h"
+#include "vk_layer.h"
 
 #ifdef __cplusplus
 extern "C" {
index 28dacf9535b9214b2fc06b50e8c4c076bf7ae1c6..4705b0ceb5d1d5a20713c3cbc4753ece376d81d5 100644 (file)
@@ -29,7 +29,7 @@
 #include <unordered_map>
 #include "loader_platform.h"
 #include "vk_dispatch_table_helper.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 // The following is #included again to catch certain OS-specific functions
 // being used:
 #include "loader_platform.h"
index ebd7be18f89c2fc753eca31d53a50dfbf4064dc5..62bfa48763644aff36f0825e0c6a3c0f1d68ac9a 100644 (file)
@@ -22,7 +22,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "vk_enum_string_helper.h"
 
 // Object Tracker ERROR codes
index 3074ab1120638ddd091e97a42818fa247fd6e880..2fb07575e3e45b377deb8b5a5aff5bef13e404bb 100644 (file)
@@ -33,7 +33,7 @@
 #include <vector>
 
 #include "loader_platform.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layers_config.h"
 #include "vk_enum_validate_helper.h"
 #include "vk_struct_validate_helper.h"
index df89d3c11fe11983d557589bc25ff2ba887747b5..854ccc6ed6e514871abcd2f306795b4f11d6c040 100644 (file)
@@ -31,7 +31,7 @@
 #include <string>
 #include "loader_platform.h"
 #include "vk_dispatch_table_helper.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "layers_config.h"
 #include "layers_msg.h"
 #include "layers_table.h"
index a952ac7cc49c6b831ba0bb6f32b06257ecfd1a13..4e7eddf0f6c328122518058dbcdec93fb12ee4ff 100644 (file)
@@ -21,7 +21,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#include "vkLayer.h"
+#include "vk_layer.h"
 #include "vk_debug_report_lunarg.h"
 
 
index 498faf8aa995616510644523dc0fd6a52b0a15b1..9a0396b049355e226222b9f9e12cc09a6add2e39 100644 (file)
@@ -34,7 +34,7 @@
 #include <alloca.h>
 #endif
 #include "debug_report.h"
-#include "vkLayer.h"
+#include "vk_layer.h"
 
 typedef void (VKAPI *PFN_stringCallback)(char *message);
 
index 577024b95680a6d3678024ac473a9db16212148a..d59df6c34322d3292f4ae55622ec142279eb72c2 100644 (file)
@@ -46,7 +46,7 @@
 #include "gpa_helper.h"
 #include "table_ops.h"
 #include "debug_report.h"
-#include "vkIcd.h"
+#include "vk_icd.h"
 #include "cJSON.h"
 
 void loader_add_to_ext_list(
index c89ad0fe9321799eeee3cb192237f03acc47b71e..6fd87687b6a25904bf34fc2c98ca9771f8b52274 100644 (file)
@@ -31,8 +31,8 @@
 #include <vulkan.h>
 #include <vk_debug_report_lunarg.h>
 #include <vk_wsi_lunarg.h>
-#include <vkLayer.h>
-#include <vkIcd.h>
+#include <vk_layer.h>
+#include <vk_icd.h>
 #include <assert.h>
 
 #if defined(__GNUC__) && __GNUC__ >= 4
index 39370f367180d9dcb2247343b0145acc20dafa38..84f033960e8bf4f517920f18c18d711d5538e59a 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include <vulkan.h>
-#include <vkLayer.h>
+#include <vk_layer.h>
 #include <string.h>
 #include "loader.h"
 #include "loader_platform.h"
index d6f9c8dc6ee47561a186e92cceecdbb57089aaeb..14341651149dc3d0a76a06e2883ab556831e0d76 100755 (executable)
@@ -107,7 +107,7 @@ class DispatchTableOpsSubcommand(Subcommand):
 
     def generate_header(self):
         return "\n".join(["#include <vulkan.h>",
-                          "#include <vkLayer.h>",
+                          "#include <vk_layer.h>",
                           "#include <string.h>"])
 
     def _generate_init_dispatch(self, type):
index 76589b2ac2c0496190d02051f1748ccc59cb45dc..276f0fedb8304d86de2eae96e2150a277c0a21f9 100755 (executable)
@@ -575,7 +575,7 @@ class Subcommand(object):
 
 class LayerFuncsSubcommand(Subcommand):
     def generate_header(self):
-        return '#include <vkLayer.h>\n#include "loader.h"'
+        return '#include <vk_layer.h>\n#include "loader.h"'
 
     def generate_body(self):
         return self._generate_dispatch_entrypoints("static")
@@ -595,7 +595,7 @@ class GenericLayerSubcommand(Subcommand):
         gen_header.append('#include <string.h>')
         gen_header.append('#include <unordered_map>')
         gen_header.append('#include "loader_platform.h"')
-        gen_header.append('#include "vkLayer.h"')
+        gen_header.append('#include "vk_layer.h"')
         gen_header.append('//The following is #included again to catch certain OS-specific functions being used:')
         gen_header.append('')
         gen_header.append('#include "loader_platform.h"')
@@ -742,7 +742,7 @@ class APIDumpSubcommand(Subcommand):
         header_txt.append('')
         header_txt.append('%s' % self.lineinfo.get())
         header_txt.append('#include "loader_platform.h"')
-        header_txt.append('#include "vkLayer.h"')
+        header_txt.append('#include "vk_layer.h"')
         header_txt.append('#include "vk_struct_string_helper_cpp.h"')
         header_txt.append('#include "layers_table.h"')
         header_txt.append('#include <unordered_map>')
@@ -1226,7 +1226,7 @@ class ThreadingSubcommand(Subcommand):
         header_txt.append('#include <string.h>')
         header_txt.append('#include <unordered_map>')
         header_txt.append('#include "loader_platform.h"')
-        header_txt.append('#include "vkLayer.h"')
+        header_txt.append('#include "vk_layer.h"')
         header_txt.append('#include "threading.h"')
         header_txt.append('#include "layers_config.h"')
         header_txt.append('#include "vk_enum_validate_helper.h"')