diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-29 15:39:26 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 17:53:20 -0600 |
| commit | be10336228bfabe276ba61adf9d6092971d3bdb7 (patch) | |
| tree | f755f71a6f68cbbdd7b0984c3e0342bcfbacce60 /include | |
| parent | e291354abe5eff9de35075020c7bbc00d4d7cf0e (diff) | |
| download | usermoji-be10336228bfabe276ba61adf9d6092971d3bdb7.tar.xz | |
loader: bug 12992: extension and layer support
Much of layers and loader updated to work with
final extension and layer mechanism.
Not everything is working here.
Diffstat (limited to 'include')
| -rw-r--r-- | include/vk_debug_marker_lunarg.h | 2 | ||||
| -rw-r--r-- | include/vk_debug_report_lunarg.h | 2 | ||||
| -rw-r--r-- | include/vk_layer.h | 2 | ||||
| -rw-r--r-- | include/vk_wsi_lunarg.h | 2 | ||||
| -rw-r--r-- | include/vulkan.h | 91 |
5 files changed, 58 insertions, 41 deletions
diff --git a/include/vk_debug_marker_lunarg.h b/include/vk_debug_marker_lunarg.h index 2d3daa10..d0fdfdc4 100644 --- a/include/vk_debug_marker_lunarg.h +++ b/include/vk_debug_marker_lunarg.h @@ -34,7 +34,7 @@ #include "vulkan.h" #define VK_DEBUG_MARKER_EXTENSION_NUMBER 3 -#define VK_DEBUG_MARKER_EXTENSION_VERSION 1 +#define VK_DEBUG_MARKER_EXTENSION_VERSION VK_MAKE_VERSION(0, 1, 0) #ifdef __cplusplus extern "C" { diff --git a/include/vk_debug_report_lunarg.h b/include/vk_debug_report_lunarg.h index 3145d938..72770e08 100644 --- a/include/vk_debug_report_lunarg.h +++ b/include/vk_debug_report_lunarg.h @@ -35,7 +35,7 @@ #include "vulkan.h" #define VK_DEBUG_REPORT_EXTENSION_NUMBER 2 -#define VK_DEBUG_REPORT_EXTENSION_VERSION 0x10 +#define VK_DEBUG_REPORT_EXTENSION_VERSION VK_MAKE_VERSION(0, 1, 0) #ifdef __cplusplus extern "C" { diff --git a/include/vk_layer.h b/include/vk_layer.h index 85c41d6e..98a636bc 100644 --- a/include/vk_layer.h +++ b/include/vk_layer.h @@ -150,8 +150,8 @@ typedef struct VkLayerInstanceDispatchTable_ PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount; PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties; PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; - PFN_vkGetPhysicalDeviceExtensionCount GetPhysicalDeviceExtensionCount; PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties; + PFN_vkGetPhysicalDeviceLayerProperties GetPhysicalDeviceLayerProperties; PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback; PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback; PFN_vkDbgStringCallback DbgStringCallback; diff --git a/include/vk_wsi_lunarg.h b/include/vk_wsi_lunarg.h index 5fea9679..9f95cc36 100644 --- a/include/vk_wsi_lunarg.h +++ b/include/vk_wsi_lunarg.h @@ -29,7 +29,7 @@ #include "vulkan.h" -#define VK_WSI_LUNARG_REVISION 3 +#define VK_WSI_LUNARG_REVISION VK_MAKE_VERSION(0, 3, 0) #define VK_WSI_LUNARG_EXTENSION_NUMBER 1 #define VK_WSI_LUNARG_EXTENSION_NAME "VK_WSI_LunarG" diff --git a/include/vulkan.h b/include/vulkan.h index 77098430..38567929 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -844,6 +844,7 @@ typedef enum VkResult_ VK_TIMEOUT = 0x0000003, VK_EVENT_SET = 0x0000004, VK_EVENT_RESET = 0x0000005, + VK_INCOMPLETE = 0x0000006, // Error codes (negative values) VK_ERROR_UNKNOWN = -(0x00000001), @@ -859,25 +860,26 @@ typedef enum VkResult_ VK_ERROR_INVALID_ORDINAL = -(0x0000000B), VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C), VK_ERROR_INVALID_EXTENSION = -(0x0000000D), - VK_ERROR_INVALID_FLAGS = -(0x0000000E), - VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F), - VK_ERROR_INVALID_FORMAT = -(0x00000010), - VK_ERROR_INVALID_IMAGE = -(0x00000011), - VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012), - VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013), - VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014), - VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015), - VK_ERROR_BAD_SHADER_CODE = -(0x00000016), - VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017), - VK_ERROR_NOT_MAPPABLE = -(0x00000018), - VK_ERROR_MEMORY_MAP_FAILED = -(0x00000019), - VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001A), - VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001B), - VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001C), - VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001D), - VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001E), - VK_ERROR_MEMORY_NOT_BOUND = -(0x0000001F), - VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000020), + VK_ERROR_INVALID_LAYER = -(0x0000000E), + VK_ERROR_INVALID_FLAGS = -(0x0000000F), + VK_ERROR_INVALID_ALIGNMENT = -(0x00000010), + VK_ERROR_INVALID_FORMAT = -(0x00000011), + VK_ERROR_INVALID_IMAGE = -(0x00000012), + VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000013), + VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000014), + VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000015), + VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000016), + VK_ERROR_BAD_SHADER_CODE = -(0x00000017), + VK_ERROR_BAD_PIPELINE_DATA = -(0x00000018), + VK_ERROR_NOT_MAPPABLE = -(0x00000019), + VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A), + VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B), + VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C), + VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D), + VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E), + VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F), + VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020), + VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021), VK_MAX_ENUM(RESULT) } VkResult; @@ -1371,12 +1373,19 @@ typedef struct VkPhysicalDevicePerformance_ typedef struct VkExtensionProperties_ { - VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES - char name[VK_MAX_EXTENSION_NAME]; // extension name + char extName[VK_MAX_EXTENSION_NAME]; // extension name uint32_t version; // version of the extension specification - char description[VK_MAX_EXTENSION_NAME]; // Name of library implementing this extension + uint32_t specVersion; // version number constructed via VK_API_VERSION } VkExtensionProperties; +typedef struct VkLayerProperties_ +{ + char layerName[VK_MAX_EXTENSION_NAME]; // extension name + uint32_t specVersion; // version of spec this layer is compatible with + uint32_t implVersion; // version of the layer + char description[VK_MAX_DESCRIPTION]; // additional description +} VkLayerProperties; + typedef struct VkApplicationInfo_ { VkStructureType sType; // Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO @@ -1417,8 +1426,10 @@ typedef struct VkDeviceCreateInfo_ const void* pNext; // Pointer to next structure uint32_t queueRecordCount; const VkDeviceQueueCreateInfo* pRequestedQueues; + uint32_t layerCount; + const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value uint32_t extensionCount; - const VkExtensionProperties* pEnabledExtensions; // Indicate extensions to enable by index value + const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value const VkPhysicalDeviceFeatures* pEnabledFeatures; VkDeviceCreateFlags flags; // Device creation flags } VkDeviceCreateInfo; @@ -1429,8 +1440,10 @@ typedef struct VkInstanceCreateInfo_ const void* pNext; // Pointer to next structure const VkApplicationInfo* pAppInfo; const VkAllocCallbacks* pAllocCb; + uint32_t layerCount; + const char*const* ppEnabledLayerNames; // Indicate extensions to enable by index value uint32_t extensionCount; - const VkExtensionProperties* pEnabledExtensions; // Indicate extensions to enable by index value + const char*const* ppEnabledExtensionNames; // Indicate extensions to enable by index value } VkInstanceCreateInfo; typedef struct VkPhysicalDeviceQueueProperties_ @@ -2168,10 +2181,10 @@ typedef VkResult (VKAPI *PFN_vkGetPhysicalDevicePerformance)(VkPhysicalDevice ph typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount); typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties); typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperies); -typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionCount)(uint32_t* pCount); -typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(uint32_t extensionIndex, VkExtensionProperties* pProperties); -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount); -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, uint32_t extensionIndex, VkExtensionProperties* pProperties); +typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char * pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); +typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t *pCount, VkExtensionProperties* pProperties); +typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties); +typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties* pProperties); typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue); typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence); typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue); @@ -2337,22 +2350,26 @@ VkResult VKAPI vkGetPhysicalDeviceMemoryProperties( // Extension discovery functions -VkResult VKAPI vkGetGlobalExtensionCount( - uint32_t* pCount); - VkResult VKAPI vkGetGlobalExtensionProperties( - uint32_t extensionIndex, + const char* pLayerName, + uint32_t* pCount, VkExtensionProperties* pProperties); -VkResult VKAPI vkGetPhysicalDeviceExtensionCount( - VkPhysicalDevice physicalDevice, - uint32_t* pCount); - VkResult VKAPI vkGetPhysicalDeviceExtensionProperties( VkPhysicalDevice physicalDevice, - uint32_t extensionIndex, + const char* pLayerName, + uint32_t* pCount, VkExtensionProperties* pProperties); +VkResult VKAPI vkGetGlobalLayerProperties( + uint32_t* pCount, + VkLayerProperties* pProperties); + +VkResult VKAPI vkGetPhysicalDeviceLayerProperties( + VkPhysicalDevice physicalDevice, + uint32_t* pCount, + VkLayerProperties* pProperties); + // Queue functions VkResult VKAPI vkGetDeviceQueue( |
