turnip: Use Vulkan 1.1 names instead of KHR
authorChad Versace <chadversary@chromium.org>
Sat, 2 Feb 2019 01:08:51 +0000 (17:08 -0800)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 11 Mar 2019 17:02:13 +0000 (10:02 -0700)
That is, drop KHR from all tokens that were promoted to Vulkan 1.1.
The consistency makes ctags more useful (it now jumps directly to the
real definitions in vulkan_core.h instead of the typedefs); and it makes
the code slightly less verbose.

src/freedreno/vulkan/tu_android.c
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_descriptor_set.c
src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_formats.c
src/freedreno/vulkan/tu_image.c
src/freedreno/vulkan/tu_pass.c
src/freedreno/vulkan/tu_private.h

index 533a5bea9dfef695d6f61a142bb342fc689d4b3a..1ebc9e726e87113ec8926b327351923444495892 100644 (file)
@@ -130,7 +130,7 @@ tu_image_from_gralloc(VkDevice device_h,
       return result;
 
    if (gralloc_info->handle->numFds != 1) {
-      return vk_errorf(device->instance, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+      return vk_errorf(device->instance, VK_ERROR_INVALID_EXTERNAL_HANDLE,
                        "VkNativeBufferANDROID::handle::numFds is %d, "
                        "expected 1",
                        gralloc_info->handle->numFds);
@@ -146,17 +146,17 @@ tu_image_from_gralloc(VkDevice device_h,
 
    VkDeviceMemory memory_h;
 
-   const VkMemoryDedicatedAllocateInfoKHR ded_alloc = {
-      .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR,
+   const VkMemoryDedicatedAllocateInfo ded_alloc = {
+      .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
       .pNext = NULL,
       .buffer = VK_NULL_HANDLE,
       .image = image_h
    };
 
-   const VkImportMemoryFdInfoKHR import_info = {
-      .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR,
+   const VkImportMemoryFdInfo import_info = {
+      .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO,
       .pNext = &ded_alloc,
-      .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR,
+      .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
       .fd = dup(dma_buf),
    };
    /* Find the first VRAM memory type, or GART for PRIME images. */
@@ -231,16 +231,16 @@ tu_GetSwapchainGrallocUsageANDROID(VkDevice device_h,
     * dEQP-VK.wsi.android.swapchain.*.image_usage to fail.
     */
 
-   const VkPhysicalDeviceImageFormatInfo2KHR image_format_info = {
-      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR,
+   const VkPhysicalDeviceImageFormatInfo2 image_format_info = {
+      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
       .format = format,
       .type = VK_IMAGE_TYPE_2D,
       .tiling = VK_IMAGE_TILING_OPTIMAL,
       .usage = imageUsage,
    };
 
-   VkImageFormatProperties2KHR image_format_props = {
-      .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR,
+   VkImageFormatProperties2 image_format_props = {
+      .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
    };
 
    /* Check that requested format and usage are supported. */
@@ -305,7 +305,7 @@ tu_AcquireImageANDROID(VkDevice device,
       semaphore_result = tu_ImportSemaphoreFdKHR(
          device, &(VkImportSemaphoreFdInfoKHR) {
                     .sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR,
-                    .flags = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR,
+                    .flags = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
                     .fd = semaphore_fd,
                     .semaphore = semaphore,
                  });
@@ -316,7 +316,7 @@ tu_AcquireImageANDROID(VkDevice device,
       fence_result = tu_ImportFenceFdKHR(
          device, &(VkImportFenceFdInfoKHR) {
                     .sType = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR,
-                    .flags = VK_FENCE_IMPORT_TEMPORARY_BIT_KHR,
+                    .flags = VK_FENCE_IMPORT_TEMPORARY_BIT,
                     .fd = fence_fd,
                     .fence = fence,
                  });
@@ -353,7 +353,7 @@ tu_QueueSignalReleaseImageANDROID(VkQueue _queue,
          tu_device_to_handle(queue->device),
          &(VkSemaphoreGetFdInfoKHR) {
             .sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR,
-            .handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR,
+            .handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
             .semaphore = pWaitSemaphores[i],
          },
          &tmp_fd);
index 7a7e4fd8599f3b427441296122b0c6bc95c7c720..b1351acf946054aa52ec5fae16dada0b29360441 100644 (file)
@@ -1967,7 +1967,7 @@ tu_ResetCommandPool(VkDevice device,
 void
 tu_TrimCommandPool(VkDevice device,
                    VkCommandPool commandPool,
-                   VkCommandPoolTrimFlagsKHR flags)
+                   VkCommandPoolTrimFlags flags)
 {
    TU_FROM_HANDLE(tu_cmd_pool, pool, commandPool);
 
index 2bfbf327592dc22038775662b426bc6df9824a4d..0f49d26e2bb56e0026a065b2d40f4bdd50f845e6 100644 (file)
@@ -481,9 +481,9 @@ tu_UpdateDescriptorSets(VkDevice _device,
 VkResult
 tu_CreateDescriptorUpdateTemplate(
    VkDevice _device,
-   const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo,
+   const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo,
    const VkAllocationCallbacks *pAllocator,
-   VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate)
+   VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate)
 {
    TU_FROM_HANDLE(tu_device, device, _device);
    TU_FROM_HANDLE(tu_descriptor_set_layout, set_layout,
@@ -510,7 +510,7 @@ tu_CreateDescriptorUpdateTemplate(
 void
 tu_DestroyDescriptorUpdateTemplate(
    VkDevice _device,
-   VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+   VkDescriptorUpdateTemplate descriptorUpdateTemplate,
    const VkAllocationCallbacks *pAllocator)
 {
    TU_FROM_HANDLE(tu_device, device, _device);
@@ -528,7 +528,7 @@ tu_update_descriptor_set_with_template(
    struct tu_device *device,
    struct tu_cmd_buffer *cmd_buffer,
    struct tu_descriptor_set *set,
-   VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+   VkDescriptorUpdateTemplate descriptorUpdateTemplate,
    const void *pData)
 {
    TU_FROM_HANDLE(tu_descriptor_update_template, templ,
@@ -540,7 +540,7 @@ void
 tu_UpdateDescriptorSetWithTemplate(
    VkDevice _device,
    VkDescriptorSet descriptorSet,
-   VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+   VkDescriptorUpdateTemplate descriptorUpdateTemplate,
    const void *pData)
 {
    TU_FROM_HANDLE(tu_device, device, _device);
index e58865e2ee4b4d88167cd94201ea796d75c66e07..3abaf0ff729a881d06bc5abb73c9c9a5bf578edc 100644 (file)
@@ -604,20 +604,20 @@ tu_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice,
 
 void
 tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
-                              VkPhysicalDeviceFeatures2KHR *pFeatures)
+                              VkPhysicalDeviceFeatures2 *pFeatures)
 {
    vk_foreach_struct(ext, pFeatures->pNext)
    {
       switch (ext->sType) {
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: {
-         VkPhysicalDeviceVariablePointerFeaturesKHR *features = (void *) ext;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: {
+         VkPhysicalDeviceVariablePointerFeatures *features = (void *) ext;
          features->variablePointersStorageBuffer = false;
          features->variablePointers = false;
          break;
       }
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR: {
-         VkPhysicalDeviceMultiviewFeaturesKHR *features =
-            (VkPhysicalDeviceMultiviewFeaturesKHR *) ext;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
+         VkPhysicalDeviceMultiviewFeatures *features =
+            (VkPhysicalDeviceMultiviewFeatures *) ext;
          features->multiview = false;
          features->multiviewGeometryShader = false;
          features->multiviewTessellationShader = false;
@@ -834,7 +834,7 @@ tu_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
 
 void
 tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
-                                VkPhysicalDeviceProperties2KHR *pProperties)
+                                VkPhysicalDeviceProperties2 *pProperties)
 {
    TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
    tu_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
@@ -848,26 +848,26 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
          properties->maxPushDescriptors = MAX_PUSH_DESCRIPTORS;
          break;
       }
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR: {
-         VkPhysicalDeviceIDPropertiesKHR *properties =
-            (VkPhysicalDeviceIDPropertiesKHR *) ext;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: {
+         VkPhysicalDeviceIDProperties *properties =
+            (VkPhysicalDeviceIDProperties *) ext;
          memcpy(properties->driverUUID, pdevice->driver_uuid, VK_UUID_SIZE);
          memcpy(properties->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE);
          properties->deviceLUIDValid = false;
          break;
       }
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR: {
-         VkPhysicalDeviceMultiviewPropertiesKHR *properties =
-            (VkPhysicalDeviceMultiviewPropertiesKHR *) ext;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: {
+         VkPhysicalDeviceMultiviewProperties *properties =
+            (VkPhysicalDeviceMultiviewProperties *) ext;
          properties->maxMultiviewViewCount = MAX_VIEWS;
          properties->maxMultiviewInstanceIndex = INT_MAX;
          break;
       }
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR: {
-         VkPhysicalDevicePointClippingPropertiesKHR *properties =
-            (VkPhysicalDevicePointClippingPropertiesKHR *) ext;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: {
+         VkPhysicalDevicePointClippingProperties *properties =
+            (VkPhysicalDevicePointClippingProperties *) ext;
          properties->pointClippingBehavior =
-            VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR;
+            VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES;
          break;
       }
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: {
@@ -909,7 +909,7 @@ void
 tu_GetPhysicalDeviceQueueFamilyProperties2(
    VkPhysicalDevice physicalDevice,
    uint32_t *pQueueFamilyPropertyCount,
-   VkQueueFamilyProperties2KHR *pQueueFamilyProperties)
+   VkQueueFamilyProperties2 *pQueueFamilyProperties)
 {
    VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount);
 
@@ -959,7 +959,7 @@ tu_GetPhysicalDeviceMemoryProperties(
 void
 tu_GetPhysicalDeviceMemoryProperties2(
    VkPhysicalDevice physicalDevice,
-   VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties)
+   VkPhysicalDeviceMemoryProperties2 *pMemoryProperties)
 {
    return tu_GetPhysicalDeviceMemoryProperties(
       physicalDevice, &pMemoryProperties->memoryProperties);
@@ -1539,8 +1539,8 @@ tu_GetBufferMemoryRequirements(VkDevice _device,
 void
 tu_GetBufferMemoryRequirements2(
    VkDevice device,
-   const VkBufferMemoryRequirementsInfo2KHR *pInfo,
-   VkMemoryRequirements2KHR *pMemoryRequirements)
+   const VkBufferMemoryRequirementsInfo2 *pInfo,
+   VkMemoryRequirements2 *pMemoryRequirements)
 {
    tu_GetBufferMemoryRequirements(device, pInfo->buffer,
                                   &pMemoryRequirements->memoryRequirements);
@@ -1560,8 +1560,8 @@ tu_GetImageMemoryRequirements(VkDevice _device,
 
 void
 tu_GetImageMemoryRequirements2(VkDevice device,
-                               const VkImageMemoryRequirementsInfo2KHR *pInfo,
-                               VkMemoryRequirements2KHR *pMemoryRequirements)
+                               const VkImageMemoryRequirementsInfo2 *pInfo,
+                               VkMemoryRequirements2 *pMemoryRequirements)
 {
    tu_GetImageMemoryRequirements(device, pInfo->image,
                                  &pMemoryRequirements->memoryRequirements);
@@ -1580,9 +1580,9 @@ tu_GetImageSparseMemoryRequirements(
 void
 tu_GetImageSparseMemoryRequirements2(
    VkDevice device,
-   const VkImageSparseMemoryRequirementsInfo2KHR *pInfo,
+   const VkImageSparseMemoryRequirementsInfo2 *pInfo,
    uint32_t *pSparseMemoryRequirementCount,
-   VkSparseImageMemoryRequirements2KHR *pSparseMemoryRequirements)
+   VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements)
 {
    tu_stub();
 }
@@ -1598,7 +1598,7 @@ tu_GetDeviceMemoryCommitment(VkDevice device,
 VkResult
 tu_BindBufferMemory2(VkDevice device,
                      uint32_t bindInfoCount,
-                     const VkBindBufferMemoryInfoKHR *pBindInfos)
+                     const VkBindBufferMemoryInfo *pBindInfos)
 {
    for (uint32_t i = 0; i < bindInfoCount; ++i) {
       TU_FROM_HANDLE(tu_device_memory, mem, pBindInfos[i].memory);
@@ -1620,8 +1620,8 @@ tu_BindBufferMemory(VkDevice device,
                     VkDeviceMemory memory,
                     VkDeviceSize memoryOffset)
 {
-   const VkBindBufferMemoryInfoKHR info = {
-      .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
+   const VkBindBufferMemoryInfo info = {
+      .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
       .buffer = buffer,
       .memory = memory,
       .memoryOffset = memoryOffset
@@ -1658,7 +1658,7 @@ tu_BindImageMemory(VkDevice device,
                    VkDeviceSize memoryOffset)
 {
    const VkBindImageMemoryInfo info = {
-      .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
+      .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
       .image = image,
       .memory = memory,
       .memoryOffset = memoryOffset
@@ -1991,8 +1991,8 @@ tu_GetMemoryFdPropertiesKHR(VkDevice _device,
 void
 tu_GetPhysicalDeviceExternalSemaphoreProperties(
    VkPhysicalDevice physicalDevice,
-   const VkPhysicalDeviceExternalSemaphoreInfoKHR *pExternalSemaphoreInfo,
-   VkExternalSemaphorePropertiesKHR *pExternalSemaphoreProperties)
+   const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo,
+   VkExternalSemaphoreProperties *pExternalSemaphoreProperties)
 {
    pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0;
    pExternalSemaphoreProperties->compatibleHandleTypes = 0;
@@ -2002,8 +2002,8 @@ tu_GetPhysicalDeviceExternalSemaphoreProperties(
 void
 tu_GetPhysicalDeviceExternalFenceProperties(
    VkPhysicalDevice physicalDevice,
-   const VkPhysicalDeviceExternalFenceInfoKHR *pExternalFenceInfo,
-   VkExternalFencePropertiesKHR *pExternalFenceProperties)
+   const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo,
+   VkExternalFenceProperties *pExternalFenceProperties)
 {
    pExternalFenceProperties->exportFromImportedHandleTypes = 0;
    pExternalFenceProperties->compatibleHandleTypes = 0;
index ce013e65c226c04d65c48250f213315d49b886bd..8df568b476cce30efdf2a1a5d7fa03102a1e08cd 100644 (file)
@@ -662,7 +662,7 @@ void
 tu_GetPhysicalDeviceFormatProperties2(
    VkPhysicalDevice physicalDevice,
    VkFormat format,
-   VkFormatProperties2KHR *pFormatProperties)
+   VkFormatProperties2 *pFormatProperties)
 {
    TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
 
@@ -673,7 +673,7 @@ tu_GetPhysicalDeviceFormatProperties2(
 static VkResult
 tu_get_image_format_properties(
    struct tu_physical_device *physical_device,
-   const VkPhysicalDeviceImageFormatInfo2KHR *info,
+   const VkPhysicalDeviceImageFormatInfo2 *info,
    VkImageFormatProperties *pImageFormatProperties)
 
 {
@@ -800,8 +800,8 @@ tu_GetPhysicalDeviceImageFormatProperties(
 {
    TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
 
-   const VkPhysicalDeviceImageFormatInfo2KHR info = {
-      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR,
+   const VkPhysicalDeviceImageFormatInfo2 info = {
+      .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
       .pNext = NULL,
       .format = format,
       .type = type,
@@ -817,13 +817,13 @@ tu_GetPhysicalDeviceImageFormatProperties(
 static VkResult
 tu_get_external_image_format_properties(
    const struct tu_physical_device *physical_device,
-   const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo,
-   VkExternalMemoryHandleTypeFlagBitsKHR handleType,
-   VkExternalMemoryPropertiesKHR *external_properties)
+   const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo,
+   VkExternalMemoryHandleTypeFlagBits handleType,
+   VkExternalMemoryProperties *external_properties)
 {
-   VkExternalMemoryFeatureFlagBitsKHR flags = 0;
-   VkExternalMemoryHandleTypeFlagsKHR export_flags = 0;
-   VkExternalMemoryHandleTypeFlagsKHR compat_flags = 0;
+   VkExternalMemoryFeatureFlagBits flags = 0;
+   VkExternalMemoryHandleTypeFlags export_flags = 0;
+   VkExternalMemoryHandleTypeFlags compat_flags = 0;
 
    /* From the Vulkan 1.1.98 spec:
     *
@@ -834,15 +834,15 @@ tu_get_external_image_format_properties(
     */
 
    switch (handleType) {
-   case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR:
+   case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
    case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
       switch (pImageFormatInfo->type) {
       case VK_IMAGE_TYPE_2D:
-         flags = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR |
-                 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR |
-                 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR;
+         flags = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT |
+                 VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT |
+                 VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT;
          compat_flags = export_flags =
-            VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR |
+            VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT |
             VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT;
          break;
       default:
@@ -852,7 +852,7 @@ tu_get_external_image_format_properties(
       }
       break;
    case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
-      flags = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR;
+      flags = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT;
       compat_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT;
       break;
    default:
@@ -861,7 +861,7 @@ tu_get_external_image_format_properties(
                        handleType);
    }
 
-   *external_properties = (VkExternalMemoryPropertiesKHR) {
+   *external_properties = (VkExternalMemoryProperties) {
       .externalMemoryFeatures = flags,
       .exportFromImportedHandleTypes = export_flags,
       .compatibleHandleTypes = compat_flags,
@@ -873,12 +873,12 @@ tu_get_external_image_format_properties(
 VkResult
 tu_GetPhysicalDeviceImageFormatProperties2(
    VkPhysicalDevice physicalDevice,
-   const VkPhysicalDeviceImageFormatInfo2KHR *base_info,
-   VkImageFormatProperties2KHR *base_props)
+   const VkPhysicalDeviceImageFormatInfo2 *base_info,
+   VkImageFormatProperties2 *base_props)
 {
    TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
-   const VkPhysicalDeviceExternalImageFormatInfoKHR *external_info = NULL;
-   VkExternalImageFormatPropertiesKHR *external_props = NULL;
+   const VkPhysicalDeviceExternalImageFormatInfo *external_info = NULL;
+   VkExternalImageFormatProperties *external_props = NULL;
    VkResult result;
 
    result = tu_get_image_format_properties(
@@ -890,7 +890,7 @@ tu_GetPhysicalDeviceImageFormatProperties2(
    vk_foreach_struct_const(s, base_info->pNext)
    {
       switch (s->sType) {
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR:
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
          external_info = (const void *) s;
          break;
       default:
@@ -902,7 +902,7 @@ tu_GetPhysicalDeviceImageFormatProperties2(
    vk_foreach_struct(s, base_props->pNext)
    {
       switch (s->sType) {
-      case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR:
+      case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
          external_props = (void *) s;
          break;
       default:
@@ -912,9 +912,9 @@ tu_GetPhysicalDeviceImageFormatProperties2(
 
    /* From the Vulkan 1.0.42 spec:
     *
-    *    If handleType is 0, vkGetPhysicalDeviceImageFormatProperties2KHR will
-    *    behave as if VkPhysicalDeviceExternalImageFormatInfoKHR was not
-    *    present and VkExternalImageFormatPropertiesKHR will be ignored.
+    *    If handleType is 0, vkGetPhysicalDeviceImageFormatProperties2 will
+    *    behave as if VkPhysicalDeviceExternalImageFormatInfo was not
+    *    present and VkExternalImageFormatProperties will be ignored.
     */
    if (external_info && external_info->handleType != 0) {
       result = tu_get_external_image_format_properties(
@@ -931,7 +931,7 @@ fail:
       /* From the Vulkan 1.0.42 spec:
        *
        *    If the combination of parameters to
-       *    vkGetPhysicalDeviceImageFormatProperties2KHR is not supported by
+       *    vkGetPhysicalDeviceImageFormatProperties2 is not supported by
        *    the implementation for use in vkCreateImage, then all members of
        *    imageFormatProperties will be filled with zero.
        */
@@ -959,9 +959,9 @@ tu_GetPhysicalDeviceSparseImageFormatProperties(
 void
 tu_GetPhysicalDeviceSparseImageFormatProperties2(
    VkPhysicalDevice physicalDevice,
-   const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
+   const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo,
    uint32_t *pPropertyCount,
-   VkSparseImageFormatProperties2KHR *pProperties)
+   VkSparseImageFormatProperties2 *pProperties)
 {
    /* Sparse images are not yet supported. */
    *pPropertyCount = 0;
@@ -970,30 +970,30 @@ tu_GetPhysicalDeviceSparseImageFormatProperties2(
 void
 tu_GetPhysicalDeviceExternalBufferProperties(
    VkPhysicalDevice physicalDevice,
-   const VkPhysicalDeviceExternalBufferInfoKHR *pExternalBufferInfo,
-   VkExternalBufferPropertiesKHR *pExternalBufferProperties)
+   const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo,
+   VkExternalBufferProperties *pExternalBufferProperties)
 {
-   VkExternalMemoryFeatureFlagBitsKHR flags = 0;
-   VkExternalMemoryHandleTypeFlagsKHR export_flags = 0;
-   VkExternalMemoryHandleTypeFlagsKHR compat_flags = 0;
+   VkExternalMemoryFeatureFlagBits flags = 0;
+   VkExternalMemoryHandleTypeFlags export_flags = 0;
+   VkExternalMemoryHandleTypeFlags compat_flags = 0;
    switch (pExternalBufferInfo->handleType) {
-   case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR:
+   case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
    case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
-      flags = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR |
-              VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR;
+      flags = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT |
+              VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT;
       compat_flags = export_flags =
-         VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR |
+         VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT |
          VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT;
       break;
    case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
-      flags = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR;
+      flags = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT;
       compat_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT;
       break;
    default:
       break;
    }
    pExternalBufferProperties->externalMemoryProperties =
-      (VkExternalMemoryPropertiesKHR) {
+      (VkExternalMemoryProperties) {
          .externalMemoryFeatures = flags,
          .exportFromImportedHandleTypes = export_flags,
          .compatibleHandleTypes = compat_flags,
index 0a4bb8712842c46ceaf2ca5de8ba520e07e809ff..8c91ea504be368614c0068d5035807841e823207 100644 (file)
@@ -161,7 +161,7 @@ tu_image_create(VkDevice _device,
    if (pCreateInfo->sharingMode == VK_SHARING_MODE_CONCURRENT) {
       for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; ++i)
          if (pCreateInfo->pQueueFamilyIndices[i] ==
-             VK_QUEUE_FAMILY_EXTERNAL_KHR)
+             VK_QUEUE_FAMILY_EXTERNAL)
             image->queue_family_mask |= (1u << TU_MAX_QUEUE_FAMILIES) - 1u;
          else
             image->queue_family_mask |=
@@ -170,7 +170,7 @@ tu_image_create(VkDevice _device,
 
    image->shareable =
       vk_find_struct_const(pCreateInfo->pNext,
-                           EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR) != NULL;
+                           EXTERNAL_MEMORY_IMAGE_CREATE_INFO) != NULL;
 
    image->tile_mode = pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ? 3 : 0;
    setup_slices(image, pCreateInfo);
@@ -230,7 +230,7 @@ tu_image_queue_family_mask(const struct tu_image *image,
 {
    if (!image->exclusive)
       return image->queue_family_mask;
-   if (family == VK_QUEUE_FAMILY_EXTERNAL_KHR)
+   if (family == VK_QUEUE_FAMILY_EXTERNAL)
       return (1u << TU_MAX_QUEUE_FAMILIES) - 1u;
    if (family == VK_QUEUE_FAMILY_IGNORED)
       return 1u << queue_family;
index e97cc2fc9d455bae25cab94d09e4d64eea32e28b..e3d9f23df649cf446665c5c924733e3d84fb61de 100644 (file)
@@ -38,7 +38,7 @@ tu_CreateRenderPass(VkDevice _device,
    struct tu_render_pass *pass;
    size_t size;
    size_t attachments_offset;
-   VkRenderPassMultiviewCreateInfoKHR *multiview_info = NULL;
+   VkRenderPassMultiviewCreateInfo *multiview_info = NULL;
 
    assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO);
 
@@ -60,8 +60,8 @@ tu_CreateRenderPass(VkDevice _device,
    vk_foreach_struct(ext, pCreateInfo->pNext)
    {
       switch (ext->sType) {
-      case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR:
-         multiview_info = (VkRenderPassMultiviewCreateInfoKHR *) ext;
+      case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
+         multiview_info = (VkRenderPassMultiviewCreateInfo *) ext;
          break;
       default:
          break;
index ccfeb5026628b259404857f5e2113191dc4a1c6a..c96353a0790b4f1ecbbacccb57fb59fd874365a1 100644 (file)
@@ -1448,7 +1448,7 @@ tu_update_descriptor_set_with_template(
    struct tu_device *device,
    struct tu_cmd_buffer *cmd_buffer,
    struct tu_descriptor_set *set,
-   VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+   VkDescriptorUpdateTemplate descriptorUpdateTemplate,
    const void *pData);
 
 void
@@ -1529,7 +1529,7 @@ TU_DEFINE_NONDISP_HANDLE_CASTS(tu_descriptor_set, VkDescriptorSet)
 TU_DEFINE_NONDISP_HANDLE_CASTS(tu_descriptor_set_layout,
                                VkDescriptorSetLayout)
 TU_DEFINE_NONDISP_HANDLE_CASTS(tu_descriptor_update_template,
-                               VkDescriptorUpdateTemplateKHR)
+                               VkDescriptorUpdateTemplate)
 TU_DEFINE_NONDISP_HANDLE_CASTS(tu_device_memory, VkDeviceMemory)
 TU_DEFINE_NONDISP_HANDLE_CASTS(tu_fence, VkFence)
 TU_DEFINE_NONDISP_HANDLE_CASTS(tu_event, VkEvent)