From 82ea0b0103880d011ca679b14f0fc5542c5b2012 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Thu, 19 Jan 2017 21:10:49 -0700 Subject: loader: Update the loader to 1.0.39 Add new extensions for 1.0.39. Also, updated layers to include minimal set of functionality for 1.0.39 extensions. Extensions include: - VK_KHR_get_physical_device_properties2 - VK_KHR_shader_draw_parameters - VK_EXT_direct_mode_display - VK_EXT_display_surface_counter - VK_EXT_display_control Also, redo the LoaderAndLayerIf document. Change-Id: I10412086da7a798afe832a3892e18f606259b5af --- scripts/parameter_validation_generator.py | 8 +- scripts/threading_generator.py | 5 +- scripts/unique_objects_generator.py | 45 ++- scripts/vk.xml | 450 +++++++++++++++++++++++++++--- 4 files changed, 441 insertions(+), 67 deletions(-) (limited to 'scripts') diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index 135faee4..3a5c87ac 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -492,6 +492,8 @@ class ParamCheckerOutputGenerator(OutputGenerator): def genVkStructureType(self, typename): # Add underscore between lowercase then uppercase value = re.sub('([a-z0-9])([A-Z])', r'\1_\2', typename) + value = value.replace('D3_D12', 'D3D12') + value = value.replace('Device_IDProp', 'Device_ID_Prop') # Change to uppercase value = value.upper() # Add STRUCTURE_TYPE_ @@ -796,7 +798,11 @@ class ParamCheckerOutputGenerator(OutputGenerator): # Need to process all elements in the array indexName = lenValue.name.replace('Count', 'Index') expr[-1] += '\n' - expr.append(indent + 'for (uint32_t {iname} = 0; {iname} < {}{}; ++{iname})\n'.format(prefix, lenValue.name, iname=indexName)) + if lenValue.ispointer: + # If the length value is a pointer, de-reference it for the count. + expr.append(indent + 'for (uint32_t {iname} = 0; {iname} < *{}{}; ++{iname})\n'.format(prefix, lenValue.name, iname=indexName)) + else: + expr.append(indent + 'for (uint32_t {iname} = 0; {iname} < {}{}; ++{iname})\n'.format(prefix, lenValue.name, iname=indexName)) expr.append(indent + '{') indent = self.incIndent(indent) # Prefix for value name to display in error message diff --git a/scripts/threading_generator.py b/scripts/threading_generator.py index 8dfdb7ef..05e659fa 100644 --- a/scripts/threading_generator.py +++ b/scripts/threading_generator.py @@ -400,9 +400,12 @@ class ThreadOutputGenerator(OutputGenerator): self.appendSection('command', decls[0]) self.intercepts += [ ' {"%s", reinterpret_cast(%s)},' % (name,name[2:]) ] return - if "KHR" in name: + if ("KHR" in name) or ("KHX" in name): self.appendSection('command', '// TODO - not wrapping KHR function ' + name) return + if ("NN" in name): + self.appendSection('command', '// TODO - not wrapping NN function ' + name) + return if ("DebugMarker" in name) and ("EXT" in name): self.appendSection('command', '// TODO - not wrapping EXT function ' + name) return diff --git a/scripts/unique_objects_generator.py b/scripts/unique_objects_generator.py index 46b7d8f0..6663df0b 100644 --- a/scripts/unique_objects_generator.py +++ b/scripts/unique_objects_generator.py @@ -408,30 +408,29 @@ class UniqueObjectsOutputGenerator(OutputGenerator): # Generate source for creating a non-dispatchable object def generate_create_ndo_code(self, indent, proto, params, cmd_info): create_ndo_code = '' - if True in [create_txt in proto.text for create_txt in ['Create', 'Allocate']]: - handle_type = params[-1].find('type') - if self.isHandleTypeNonDispatchable(handle_type.text): - # Check for special case where multiple handles are returned - ndo_array = False - if cmd_info[-1].len is not None: - ndo_array = True; - handle_name = params[-1].find('name') - create_ndo_code += '%sif (VK_SUCCESS == result) {\n' % (indent) + handle_type = params[-1].find('type') + if self.isHandleTypeNonDispatchable(handle_type.text): + # Check for special case where multiple handles are returned + ndo_array = False + if cmd_info[-1].len is not None: + ndo_array = True; + handle_name = params[-1].find('name') + create_ndo_code += '%sif (VK_SUCCESS == result) {\n' % (indent) + indent = self.incIndent(indent) + create_ndo_code += '%sstd::lock_guard lock(global_lock);\n' % (indent) + ndo_dest = '*%s' % handle_name.text + if ndo_array == True: + create_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[-1].len) indent = self.incIndent(indent) - create_ndo_code += '%sstd::lock_guard lock(global_lock);\n' % (indent) - ndo_dest = '*%s' % handle_name.text - if ndo_array == True: - create_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[-1].len) - indent = self.incIndent(indent) - ndo_dest = '%s[index0]' % cmd_info[-1].name - create_ndo_code += '%suint64_t unique_id = global_unique_id++;\n' % (indent) - create_ndo_code += '%sdev_data->unique_id_mapping[unique_id] = reinterpret_cast(%s);\n' % (indent, ndo_dest) - create_ndo_code += '%s%s = reinterpret_cast<%s&>(unique_id);\n' % (indent, ndo_dest, handle_type.text) - if ndo_array == True: - indent = self.decIndent(indent) - create_ndo_code += '%s}\n' % indent + ndo_dest = '%s[index0]' % cmd_info[-1].name + create_ndo_code += '%suint64_t unique_id = global_unique_id++;\n' % (indent) + create_ndo_code += '%sdev_data->unique_id_mapping[unique_id] = reinterpret_cast(%s);\n' % (indent, ndo_dest) + create_ndo_code += '%s%s = reinterpret_cast<%s&>(unique_id);\n' % (indent, ndo_dest, handle_type.text) + if ndo_array == True: indent = self.decIndent(indent) - create_ndo_code += '%s}\n' % (indent) + create_ndo_code += '%s}\n' % indent + indent = self.decIndent(indent) + create_ndo_code += '%s}\n' % (indent) return create_ndo_code # # Generate source for destroying a non-dispatchable object @@ -685,7 +684,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): islocal = True isdestroy = True if True in [destroy_txt in cmdname for destroy_txt in ['Destroy', 'Free']] else False - iscreate = True if True in [create_txt in cmdname for create_txt in ['Create', 'Allocate']] else False + iscreate = True if True in [create_txt in cmdname for create_txt in ['Create', 'Allocate', 'GetRandROutputDisplayEXT', 'RegisterDeviceEvent', 'RegisterDisplayEvent']] else False membersInfo.append(self.CommandParam(type=type, name=name, diff --git a/scripts/vk.xml b/scripts/vk.xml index 4f358c20..779875b8 100644 --- a/scripts/vk.xml +++ b/scripts/vk.xml @@ -1,7 +1,7 @@ -Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2017 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 @@ -62,6 +62,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + @@ -70,6 +71,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. #include "vulkan.h" #include <X11/Xlib.h> + #include <X11/extensions/Xrandr.h> #include <android/native_window.h> #include <mir_toolkit/client_types.h> #include <wayland-client.h> @@ -79,6 +81,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + @@ -104,7 +107,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0) // Version of this file -#define VK_HEADER_VERSION 38 +#define VK_HEADER_VERSION 39 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -208,14 +211,17 @@ maintained in the master branch of the Khronos Vulkan GitHub project. typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; typedef VkFlags VkMirSurfaceCreateFlagsKHR; + typedef VkFlags VkViSurfaceCreateFlagsNN; typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; typedef VkFlags VkWin32SurfaceCreateFlagsKHR; typedef VkFlags VkXlibSurfaceCreateFlagsKHR; typedef VkFlags VkXcbSurfaceCreateFlagsKHR; typedef VkFlags VkDebugReportFlagsEXT; + typedef VkFlags VkCommandPoolTrimFlagsKHR; typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; typedef VkFlags VkExternalMemoryFeatureFlagsNV; + typedef VkFlags VkSurfaceCounterFlagsEXT; VK_DEFINE_HANDLE(VkInstance) @@ -357,6 +363,10 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + + + + typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( @@ -492,7 +502,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkStructureType sType - const void* pNext + const void* pNext VkDeviceCreateFlags flags uint32_t queueCreateInfoCount const VkDeviceQueueCreateInfo* pQueueCreateInfos @@ -1463,6 +1473,12 @@ maintained in the master branch of the Khronos Vulkan GitHub project. MirConnection* connection MirSurface* mirSurface + + VkStructureType sType + const void* pNext + VkViSurfaceCreateFlagsNN flags + void* window + VkStructureType sType const void* pNext @@ -1517,7 +1533,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkStructureType sType - const void* pNext + const void* pNext uint32_t waitSemaphoreCount const VkSemaphore* pWaitSemaphores uint32_t swapchainCount @@ -1713,6 +1729,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkObjectEntryTypeNVX type VkObjectEntryUsageFlagsNVX flags VkBuffer buffer + VkIndexType indexType VkObjectEntryTypeNVX type @@ -1720,6 +1737,94 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkPipelineLayout pipelineLayout VkShaderStageFlags stageFlags + + VkStructureType sType + void* pNext + VkPhysicalDeviceFeatures features + + + VkStructureType sType + void* pNext + VkPhysicalDeviceProperties properties + + + VkStructureType sType + void* pNext + VkFormatProperties formatProperties + + + VkStructureType sType + void* pNext + VkImageFormatProperties imageFormatProperties + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + + + VkStructureType sType + void* pNext + VkQueueFamilyProperties queueFamilyProperties + + + VkStructureType sType + void* pNext + VkPhysicalDeviceMemoryProperties memoryProperties + + + VkStructureType sType + void* pNext + VkSparseImageFormatProperties properties + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + + + VkStructureType sType + void* pNext + uint32_t minImageCount + uint32_t maxImageCount + VkExtent2D currentExtent + VkExtent2D minImageExtent + VkExtent2D maxImageExtent + uint32_t maxImageArrayLayers + VkSurfaceTransformFlagsKHR supportedTransforms + VkSurfaceTransformFlagBitsKHR currentTransform + VkCompositeAlphaFlagsKHR supportedCompositeAlpha + VkImageUsageFlags supportedUsageFlags + VkSurfaceCounterFlagsEXT supportedSurfaceCounters + + + VkStructureType sType + const void* pNext + VkDisplayPowerStateEXT powerState + + + VkStructureType sType + const void* pNext + VkDeviceEventTypeEXT deviceEvent + + + VkStructureType sType + const void* pNext + VkDisplayEventTypeEXT displayEvent + + + VkStructureType sType + const void* pNext + VkSurfaceCounterFlagsEXT surfaceCounters + @@ -2575,6 +2680,21 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + + + + + + + + + + + + + + + @@ -3372,7 +3492,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkDeviceSize dataSize const void* pData - + void vkCmdFillBuffer VkCommandBuffer commandBuffer VkBuffer dstBuffer @@ -3666,6 +3786,13 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkQueue queue const VkPresentInfoKHR* pPresentInfo + + VkResult vkCreateViSurfaceNN + VkInstance instance + const VkViSurfaceCreateInfoNN* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + VkResult vkCreateWaylandSurfaceKHR VkInstance instance @@ -3863,6 +3990,104 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkDeviceGeneratedCommandsFeaturesNVX* pFeatures VkDeviceGeneratedCommandsLimitsNVX* pLimits + + void vkGetPhysicalDeviceFeatures2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures2KHR* pFeatures + + + void vkGetPhysicalDeviceProperties2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties2KHR* pProperties + + + void vkGetPhysicalDeviceFormatProperties2KHR + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties2KHR* pFormatProperties + + + VkResult vkGetPhysicalDeviceImageFormatProperties2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo + VkImageFormatProperties2KHR* pImageFormatProperties + + + void vkGetPhysicalDeviceQueueFamilyProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties2KHR* pQueueFamilyProperties + + + void vkGetPhysicalDeviceMemoryProperties2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties + + + void vkGetPhysicalDeviceSparseImageFormatProperties2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo + uint32_t* pPropertyCount + VkSparseImageFormatProperties2KHR* pProperties + + + void vkTrimCommandPoolKHR + VkDevice device + VkCommandPool commandPool + VkCommandPoolTrimFlagsKHR flags + + + VkResult vkReleaseDisplayEXT + VkPhysicalDevice physicalDevice + VkDisplayKHR display + + + VkResult vkAcquireXlibDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + VkDisplayKHR display + + + VkResult vkGetRandROutputDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + RROutput rrOutput + VkDisplayKHR* pDisplay + + + VkResult vkDisplayPowerControlEXT + VkDevice device + VkDisplayKHR display + const VkDisplayPowerInfoEXT* pDisplayPowerInfo + + + VkResult vkRegisterDeviceEventEXT + VkDevice device + const VkDeviceEventInfoEXT* pDeviceEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkRegisterDisplayEventEXT + VkDevice device + VkDisplayKHR display + const VkDisplayEventInfoEXT* pDisplayEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkGetSwapchainCounterEXT + VkDevice device + VkSwapchainKHR swapchain + VkSurfaceCounterFlagBitsEXT counter + uint64_t* pCounterValue + + + VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilities2EXT* pSurfaceCapabilities + @@ -4581,10 +4806,35 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4601,28 +4851,32 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - - + + + + + + - + - - + + - + - - + + - + - - + + @@ -4643,10 +4897,15 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - - + + + + + + + @@ -4797,29 +5056,52 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - - - + + + + - + - - - + + + + + - + - - - + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + @@ -4893,10 +5175,94 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + -- cgit v1.2.3