From 6cb5fd0d7163a2430f14686faad037912f18b557 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 1 Feb 2019 17:08:51 -0800 Subject: [PATCH] turnip: Use Vulkan 1.1 names instead of KHR 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 | 26 ++++---- src/freedreno/vulkan/tu_cmd_buffer.c | 2 +- src/freedreno/vulkan/tu_descriptor_set.c | 10 +-- src/freedreno/vulkan/tu_device.c | 66 +++++++++---------- src/freedreno/vulkan/tu_formats.c | 80 ++++++++++++------------ src/freedreno/vulkan/tu_image.c | 6 +- src/freedreno/vulkan/tu_pass.c | 6 +- src/freedreno/vulkan/tu_private.h | 4 +- 8 files changed, 100 insertions(+), 100 deletions(-) diff --git a/src/freedreno/vulkan/tu_android.c b/src/freedreno/vulkan/tu_android.c index 533a5bea9df..1ebc9e726e8 100644 --- a/src/freedreno/vulkan/tu_android.c +++ b/src/freedreno/vulkan/tu_android.c @@ -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); diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 7a7e4fd8599..b1351acf946 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -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); diff --git a/src/freedreno/vulkan/tu_descriptor_set.c b/src/freedreno/vulkan/tu_descriptor_set.c index 2bfbf327592..0f49d26e2bb 100644 --- a/src/freedreno/vulkan/tu_descriptor_set.c +++ b/src/freedreno/vulkan/tu_descriptor_set.c @@ -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); diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index e58865e2ee4..3abaf0ff729 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -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; diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c index ce013e65c22..8df568b476c 100644 --- a/src/freedreno/vulkan/tu_formats.c +++ b/src/freedreno/vulkan/tu_formats.c @@ -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, diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 0a4bb871284..8c91ea504be 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -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; diff --git a/src/freedreno/vulkan/tu_pass.c b/src/freedreno/vulkan/tu_pass.c index e97cc2fc9d4..e3d9f23df64 100644 --- a/src/freedreno/vulkan/tu_pass.c +++ b/src/freedreno/vulkan/tu_pass.c @@ -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; diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index ccfeb502662..c96353a0790 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -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) -- 2.30.2