diff options
author | Jason Ekstrand <[email protected]> | 2017-09-20 13:16:26 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | bd1279bd9fc9b7d9b4a2f74e096d771dde80f01b (patch) | |
tree | 1fc179c92dbc661a0efee018d162e7b22335cdeb | |
parent | af461986dba36e6ac625764290312b7cbbd8f4a8 (diff) |
Get rid of a bunch of KHR suffixes
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_cmd_buffer.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 12 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 82 | ||||
-rw-r--r-- | src/intel/vulkan/anv_formats.c | 162 | ||||
-rw-r--r-- | src/intel/vulkan/anv_image.c | 50 | ||||
-rw-r--r-- | src/intel/vulkan/anv_nir_lower_ycbcr_textures.c | 20 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 34 | ||||
-rw-r--r-- | src/intel/vulkan/anv_queue.c | 74 | ||||
-rw-r--r-- | src/intel/vulkan/genX_state.c | 6 | ||||
-rw-r--r-- | src/intel/vulkan/vk_format_info.h | 50 |
11 files changed, 248 insertions, 248 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 13d55e0efe1..e083d79d35b 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1480,7 +1480,7 @@ anv_cmd_buffer_execbuf(struct anv_device *device, } else { int merge = anv_gem_sync_file_merge(device, in_fence, impl->fd); if (merge == -1) - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); close(impl->fd); close(in_fence); diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index a64990a02ac..9929241488b 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -878,7 +878,7 @@ VkResult anv_ResetCommandPool( void anv_TrimCommandPool( VkDevice device, VkCommandPool commandPool, - VkCommandPoolTrimFlagsKHR flags) + VkCommandPoolTrimFlags flags) { /* Nothing for us to do here. Our pools stay pretty tidy. */ } @@ -1026,7 +1026,7 @@ void anv_CmdPushDescriptorSetKHR( void anv_CmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout _layout, uint32_t _set, const void* pData) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 8f776483048..c1293766989 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -460,7 +460,7 @@ anv_descriptor_set_create(struct anv_device *device, if (pool->free_list != EMPTY) { return vk_error(VK_ERROR_FRAGMENTED_POOL); } else { - return vk_error(VK_ERROR_OUT_OF_POOL_MEMORY_KHR); + return vk_error(VK_ERROR_OUT_OF_POOL_MEMORY); } } @@ -892,9 +892,9 @@ anv_descriptor_set_write_template(struct anv_descriptor_set *set, VkResult anv_CreateDescriptorUpdateTemplate( VkDevice _device, - const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { ANV_FROM_HANDLE(anv_device, device, _device); struct anv_descriptor_update_template *template; @@ -908,7 +908,7 @@ VkResult anv_CreateDescriptorUpdateTemplate( template->bind_point = pCreateInfo->pipelineBindPoint; - if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR) + if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET) template->set = pCreateInfo->set; template->entry_count = pCreateInfo->descriptorUpdateEntryCount; @@ -934,7 +934,7 @@ VkResult anv_CreateDescriptorUpdateTemplate( void anv_DestroyDescriptorUpdateTemplate( VkDevice _device, - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { ANV_FROM_HANDLE(anv_device, device, _device); @@ -947,7 +947,7 @@ void anv_DestroyDescriptorUpdateTemplate( void anv_UpdateDescriptorSetWithTemplate( VkDevice _device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { ANV_FROM_HANDLE(anv_device, device, _device); diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index e261bb58b86..bbc418066a7 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -761,31 +761,31 @@ void anv_GetPhysicalDeviceFeatures( void anv_GetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2KHR* pFeatures) + VkPhysicalDeviceFeatures2* pFeatures) { anv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); vk_foreach_struct(ext, pFeatures->pNext) { switch (ext->sType) { - 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 = true; features->multiviewGeometryShader = true; features->multiviewTessellationShader = true; break; } - 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 = true; features->variablePointers = true; break; } - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR: { - VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *features = - (VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *) ext; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: { + VkPhysicalDeviceSamplerYcbcrConversionFeatures *features = + (VkPhysicalDeviceSamplerYcbcrConversionFeatures *) ext; features->samplerYcbcrConversion = true; break; } @@ -958,7 +958,7 @@ void anv_GetPhysicalDeviceProperties( void anv_GetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2KHR* pProperties) + VkPhysicalDeviceProperties2* pProperties) { ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice); @@ -974,9 +974,9 @@ void anv_GetPhysicalDeviceProperties2( break; } - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR: { - VkPhysicalDeviceIDPropertiesKHR *id_props = - (VkPhysicalDeviceIDPropertiesKHR *)ext; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: { + VkPhysicalDeviceIDProperties *id_props = + (VkPhysicalDeviceIDProperties *)ext; memcpy(id_props->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE); memcpy(id_props->driverUUID, pdevice->driver_uuid, VK_UUID_SIZE); /* The LUID is for Windows. */ @@ -984,18 +984,18 @@ void anv_GetPhysicalDeviceProperties2( 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 = 16; properties->maxMultiviewInstanceIndex = UINT32_MAX / 16; break; } - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR: { - VkPhysicalDevicePointClippingPropertiesKHR *properties = - (VkPhysicalDevicePointClippingPropertiesKHR *) ext; - properties->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: { + VkPhysicalDevicePointClippingProperties *properties = + (VkPhysicalDevicePointClippingProperties *) ext; + properties->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES; anv_finishme("Implement pop-free point clipping"); break; } @@ -1033,7 +1033,7 @@ void anv_GetPhysicalDeviceQueueFamilyProperties( void anv_GetPhysicalDeviceQueueFamilyProperties2( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2KHR* pQueueFamilyProperties) + VkQueueFamilyProperties2* pQueueFamilyProperties) { VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount); @@ -1072,7 +1072,7 @@ void anv_GetPhysicalDeviceMemoryProperties( void anv_GetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { anv_GetPhysicalDeviceMemoryProperties(physicalDevice, &pMemoryProperties->memoryProperties); @@ -1835,7 +1835,7 @@ VkResult anv_AllocateMemory( if (fd_info && fd_info->handleType) { /* At the moment, we support only the below handle types. */ assert(fd_info->handleType == - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR || + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT || fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT); @@ -1943,7 +1943,7 @@ VkResult anv_GetMemoryFdKHR( assert(pGetFdInfo->sType == VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR); - assert(pGetFdInfo->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR || + assert(pGetFdInfo->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT || pGetFdInfo->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT); return anv_bo_cache_export(dev, &dev->bo_cache, mem->bo, pFd); @@ -1973,7 +1973,7 @@ VkResult anv_GetMemoryFdPropertiesKHR( * * So opaque handle types fall into the default "unsupported" case. */ - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } } @@ -2172,16 +2172,16 @@ void anv_GetBufferMemoryRequirements( void anv_GetBufferMemoryRequirements2( VkDevice _device, - const VkBufferMemoryRequirementsInfo2KHR* pInfo, - VkMemoryRequirements2KHR* pMemoryRequirements) + const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { anv_GetBufferMemoryRequirements(_device, pInfo->buffer, &pMemoryRequirements->memoryRequirements); vk_foreach_struct(ext, pMemoryRequirements->pNext) { switch (ext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR: { - VkMemoryDedicatedRequirementsKHR *requirements = (void *)ext; + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: { + VkMemoryDedicatedRequirements *requirements = (void *)ext; requirements->prefersDedicatedAllocation = VK_FALSE; requirements->requiresDedicatedAllocation = VK_FALSE; break; @@ -2221,8 +2221,8 @@ void anv_GetImageMemoryRequirements( void anv_GetImageMemoryRequirements2( VkDevice _device, - const VkImageMemoryRequirementsInfo2KHR* pInfo, - VkMemoryRequirements2KHR* pMemoryRequirements) + const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_image, image, pInfo->image); @@ -2232,7 +2232,7 @@ void anv_GetImageMemoryRequirements2( vk_foreach_struct_const(ext, pInfo->pNext) { switch (ext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR: { + case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: { struct anv_physical_device *pdevice = &device->instance->physicalDevice; const VkImagePlaneMemoryRequirementsInfoKHR *plane_reqs = (const VkImagePlaneMemoryRequirementsInfoKHR *) ext; @@ -2268,8 +2268,8 @@ void anv_GetImageMemoryRequirements2( vk_foreach_struct(ext, pMemoryRequirements->pNext) { switch (ext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR: { - VkMemoryDedicatedRequirementsKHR *requirements = (void *)ext; + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: { + VkMemoryDedicatedRequirements *requirements = (void *)ext; if (image->needs_set_tiling) { /* If we need to set the tiling for external consumers, we need a * dedicated allocation. @@ -2303,9 +2303,9 @@ void anv_GetImageSparseMemoryRequirements( void anv_GetImageSparseMemoryRequirements2( VkDevice device, - const VkImageSparseMemoryRequirementsInfo2KHR* pInfo, + const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { *pSparseMemoryRequirementCount = 0; } @@ -2319,12 +2319,12 @@ void anv_GetDeviceMemoryCommitment( } static void -anv_bind_buffer_memory(const VkBindBufferMemoryInfoKHR *pBindInfo) +anv_bind_buffer_memory(const VkBindBufferMemoryInfo *pBindInfo) { ANV_FROM_HANDLE(anv_device_memory, mem, pBindInfo->memory); ANV_FROM_HANDLE(anv_buffer, buffer, pBindInfo->buffer); - assert(pBindInfo->sType == VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR); + assert(pBindInfo->sType == VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO); if (mem) { assert((buffer->usage & mem->type->valid_buffer_usage) == buffer->usage); @@ -2343,8 +2343,8 @@ VkResult anv_BindBufferMemory( VkDeviceSize memoryOffset) { anv_bind_buffer_memory( - &(VkBindBufferMemoryInfoKHR) { - .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, + &(VkBindBufferMemoryInfo) { + .sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, .buffer = buffer, .memory = memory, .memoryOffset = memoryOffset, @@ -2356,7 +2356,7 @@ VkResult anv_BindBufferMemory( VkResult anv_BindBufferMemory2( VkDevice device, uint32_t bindInfoCount, - const VkBindBufferMemoryInfoKHR* pBindInfos) + const VkBindBufferMemoryInfo* pBindInfos) { for (uint32_t i = 0; i < bindInfoCount; i++) anv_bind_buffer_memory(&pBindInfos[i]); diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 1cfe945f15d..8d1ea402f0f 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -303,70 +303,70 @@ static const struct anv_format main_formats[] = { }; static const struct anv_format ycbcr_formats[] = { - ycbcr_fmt(VK_FORMAT_G8B8G8R8_422_UNORM_KHR, 1, + ycbcr_fmt(VK_FORMAT_G8B8G8R8_422_UNORM, 1, y_plane(ISL_FORMAT_YCRCB_SWAPUV, RGBA, _ISL_SWIZZLE(BLUE, GREEN, RED, ZERO), 1, 1)), - ycbcr_fmt(VK_FORMAT_B8G8R8G8_422_UNORM_KHR, 1, + ycbcr_fmt(VK_FORMAT_B8G8R8G8_422_UNORM, 1, y_plane(ISL_FORMAT_YCRCB_SWAPUVY, RGBA, _ISL_SWIZZLE(BLUE, GREEN, RED, ZERO), 1, 1)), - ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, 3, y_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 2, 2), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 2, 2)), - ycbcr_fmt(VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR, 2, + ycbcr_fmt(VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, 2, y_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8G8_UNORM, RGBA, _ISL_SWIZZLE(BLUE, RED, ZERO, ZERO), 2, 2)), - ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, 3, y_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 2, 1), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 2, 1)), - ycbcr_fmt(VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR, 2, + ycbcr_fmt(VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, 2, y_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8G8_UNORM, RGBA, _ISL_SWIZZLE(BLUE, RED, ZERO, ZERO), 2, 1)), - ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, 3, y_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R8_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 1, 1)), - fmt_unsupported(VK_FORMAT_R10X6_UNORM_PACK16_KHR), - fmt_unsupported(VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR), - fmt_unsupported(VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_R12X4_UNORM_PACK16_KHR), - fmt_unsupported(VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR), - fmt_unsupported(VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR), - fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR), + fmt_unsupported(VK_FORMAT_R10X6_UNORM_PACK16), + fmt_unsupported(VK_FORMAT_R10X6G10X6_UNORM_2PACK16), + fmt_unsupported(VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_R12X4_UNORM_PACK16), + fmt_unsupported(VK_FORMAT_R12X4G12X4_UNORM_2PACK16), + fmt_unsupported(VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16), + fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16), + fmt_unsupported(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16), /* TODO: it is possible to enable the following 2 formats, but that * requires further refactoring of how we handle multiplanar formats. */ - fmt_unsupported(VK_FORMAT_G16B16G16R16_422_UNORM_KHR), - fmt_unsupported(VK_FORMAT_B16G16R16G16_422_UNORM_KHR), + fmt_unsupported(VK_FORMAT_G16B16G16R16_422_UNORM), + fmt_unsupported(VK_FORMAT_B16G16R16G16_422_UNORM), - ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, 3, y_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 2, 2), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 2, 2)), - ycbcr_fmt(VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR, 2, + ycbcr_fmt(VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, 2, y_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16G16_UNORM, RGBA, _ISL_SWIZZLE(BLUE, RED, ZERO, ZERO), 2, 2)), - ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, 3, y_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 2, 1), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 2, 1)), - ycbcr_fmt(VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR, 2, + ycbcr_fmt(VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, 2, y_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16G16_UNORM, RGBA, _ISL_SWIZZLE(BLUE, RED, ZERO, ZERO), 2, 1)), - ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR, 3, + ycbcr_fmt(VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, 3, y_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(GREEN, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(BLUE, ZERO, ZERO, ZERO), 1, 1), chroma_plane(ISL_FORMAT_R16_UNORM, RGBA, _ISL_SWIZZLE(RED, ZERO, ZERO, ZERO), 1, 1)), @@ -550,8 +550,8 @@ get_image_format_features(const struct gen_device_info *devinfo, flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT; if (flags) { - flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | - VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; + flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT | + VK_FORMAT_FEATURE_TRANSFER_DST_BIT; } /* XXX: We handle 3-channel formats by switching them out for RGBX or @@ -578,11 +578,11 @@ get_image_format_features(const struct gen_device_info *devinfo, * sampler. The failures show a slightly out of range values on the * bottom left of the sampled image. */ - flags |= VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR; + flags |= VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT; } else { - flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR | - VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR | - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR; + flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT | + VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT; } /* We can support cosited chroma locations when handle planes with our @@ -591,13 +591,13 @@ get_image_format_features(const struct gen_device_info *devinfo, for (unsigned p = 0; p < anv_format->n_planes; p++) { if (anv_format->planes[p].denominator_scales[0] > 1 || anv_format->planes[p].denominator_scales[1] > 1) { - flags |= VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR; + flags |= VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT; break; } } if (anv_format->n_planes > 1) - flags |= VK_FORMAT_FEATURE_DISJOINT_BIT_KHR; + flags |= VK_FORMAT_FEATURE_DISJOINT_BIT; const VkFormatFeatureFlags disallowed_ycbcr_image_features = VK_FORMAT_FEATURE_BLIT_SRC_BIT | @@ -708,7 +708,7 @@ void anv_GetPhysicalDeviceFormatProperties( void anv_GetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2KHR* pFormatProperties) + VkFormatProperties2* pFormatProperties) { ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice); anv_GetPhysicalDeviceFormatProperties(physicalDevice, format, @@ -730,7 +730,7 @@ void anv_GetPhysicalDeviceFormatProperties2( static VkResult anv_get_image_format_properties( struct anv_physical_device *physical_device, - const VkPhysicalDeviceImageFormatInfo2KHR *info, + const VkPhysicalDeviceImageFormatInfo2 *info, VkImageFormatProperties *pImageFormatProperties, VkSamplerYcbcrConversionImageFormatPropertiesKHR *pYcbcrImageFormatProperties) { @@ -897,8 +897,8 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties( { ANV_FROM_HANDLE(anv_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, @@ -911,34 +911,34 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties( pImageFormatProperties, NULL); } -static const VkExternalMemoryPropertiesKHR prime_fd_props = { +static const VkExternalMemoryProperties prime_fd_props = { /* If we can handle external, then we can both import and export it. */ - .externalMemoryFeatures = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR | - VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR, + .externalMemoryFeatures = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT | + VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT, /* For the moment, let's not support mixing and matching */ .exportFromImportedHandleTypes = - 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, .compatibleHandleTypes = - 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, }; VkResult anv_GetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2KHR* base_info, - VkImageFormatProperties2KHR* base_props) + const VkPhysicalDeviceImageFormatInfo2* base_info, + VkImageFormatProperties2* base_props) { ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice); - const VkPhysicalDeviceExternalImageFormatInfoKHR *external_info = NULL; + const VkPhysicalDeviceExternalImageFormatInfo *external_info = NULL; VkExternalImageFormatPropertiesKHR *external_props = NULL; - VkSamplerYcbcrConversionImageFormatPropertiesKHR *ycbcr_props = NULL; + VkSamplerYcbcrConversionImageFormatProperties *ycbcr_props = NULL; VkResult result; /* Extract input structs */ 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: @@ -950,10 +950,10 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2( /* Extract output structs */ 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; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR: + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: ycbcr_props = (void *) s; break; default: @@ -969,13 +969,13 @@ VkResult anv_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) { switch (external_info->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: if (external_props) external_props->externalMemoryProperties = prime_fd_props; @@ -984,13 +984,13 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2( /* From the Vulkan 1.0.42 spec: * * If handleType is not compatible with the [parameters] specified - * in VkPhysicalDeviceImageFormatInfo2KHR, then - * vkGetPhysicalDeviceImageFormatProperties2KHR returns + * in VkPhysicalDeviceImageFormatInfo2, then + * vkGetPhysicalDeviceImageFormatProperties2 returns * VK_ERROR_FORMAT_NOT_SUPPORTED. */ result = vk_errorf(physical_device->instance, physical_device, VK_ERROR_FORMAT_NOT_SUPPORTED, - "unsupported VkExternalMemoryTypeFlagBitsKHR 0x%x", + "unsupported VkExternalMemoryTypeFlagBits 0x%x", external_info->handleType); goto fail; } @@ -1003,7 +1003,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2( /* 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. */ @@ -1029,9 +1029,9 @@ void anv_GetPhysicalDeviceSparseImageFormatProperties( void anv_GetPhysicalDeviceSparseImageFormatProperties2( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, - VkSparseImageFormatProperties2KHR* pProperties) + VkSparseImageFormatProperties2* pProperties) { /* Sparse images are not yet supported. */ *pPropertyCount = 0; @@ -1039,13 +1039,13 @@ void anv_GetPhysicalDeviceSparseImageFormatProperties2( void anv_GetPhysicalDeviceExternalBufferProperties( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, - VkExternalBufferPropertiesKHR* pExternalBufferProperties) + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { /* The Vulkan 1.0.42 spec says "handleType must be a valid - * VkExternalMemoryHandleTypeFlagBitsKHR value" in - * VkPhysicalDeviceExternalBufferInfoKHR. This differs from - * VkPhysicalDeviceExternalImageFormatInfoKHR, which surprisingly permits + * VkExternalMemoryHandleTypeFlagBits value" in + * VkPhysicalDeviceExternalBufferInfo. This differs from + * VkPhysicalDeviceExternalImageFormatInfo, which surprisingly permits * handleType == 0. */ assert(pExternalBufferInfo->handleType != 0); @@ -1058,7 +1058,7 @@ void anv_GetPhysicalDeviceExternalBufferProperties( goto unsupported; 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: pExternalBufferProperties->externalMemoryProperties = prime_fd_props; return; @@ -1068,19 +1068,19 @@ void anv_GetPhysicalDeviceExternalBufferProperties( unsupported: pExternalBufferProperties->externalMemoryProperties = - (VkExternalMemoryPropertiesKHR) {0}; + (VkExternalMemoryProperties) {0}; } VkResult anv_CreateSamplerYcbcrConversion( VkDevice _device, - const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo, + const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversionKHR* pYcbcrConversion) + VkSamplerYcbcrConversion* pYcbcrConversion) { ANV_FROM_HANDLE(anv_device, device, _device); struct anv_ycbcr_conversion *conversion; - assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR); + assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO); conversion = vk_alloc2(&device->alloc, pAllocator, sizeof(*conversion), 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); @@ -1108,8 +1108,8 @@ VkResult anv_CreateSamplerYcbcrConversion( has_chroma_subsampled = true; } conversion->chroma_reconstruction = has_chroma_subsampled && - (conversion->chroma_offsets[0] == VK_CHROMA_LOCATION_COSITED_EVEN_KHR || - conversion->chroma_offsets[1] == VK_CHROMA_LOCATION_COSITED_EVEN_KHR); + (conversion->chroma_offsets[0] == VK_CHROMA_LOCATION_COSITED_EVEN || + conversion->chroma_offsets[1] == VK_CHROMA_LOCATION_COSITED_EVEN); *pYcbcrConversion = anv_ycbcr_conversion_to_handle(conversion); @@ -1118,7 +1118,7 @@ VkResult anv_CreateSamplerYcbcrConversion( void anv_DestroySamplerYcbcrConversion( VkDevice _device, - VkSamplerYcbcrConversionKHR YcbcrConversion, + VkSamplerYcbcrConversion YcbcrConversion, const VkAllocationCallbacks* pAllocator) { ANV_FROM_HANDLE(anv_device, device, _device); diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 07da9a279bb..4d60f872c1e 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -67,9 +67,9 @@ choose_isl_surf_usage(VkImageCreateFlags vk_create_flags, isl_usage |= ISL_SURF_USAGE_STENCIL_BIT; break; case VK_IMAGE_ASPECT_COLOR_BIT: - case VK_IMAGE_ASPECT_PLANE_0_BIT_KHR: - case VK_IMAGE_ASPECT_PLANE_1_BIT_KHR: - case VK_IMAGE_ASPECT_PLANE_2_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_0_BIT: + case VK_IMAGE_ASPECT_PLANE_1_BIT: + case VK_IMAGE_ASPECT_PLANE_2_BIT: break; default: unreachable("bad VkImageAspect"); @@ -327,7 +327,7 @@ make_surface(const struct anv_device *dev, */ bool needs_shadow = false; if (dev->info.gen <= 8 && - (vk_info->flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR) && + (vk_info->flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) && vk_info->tiling == VK_IMAGE_TILING_OPTIMAL) { assert(isl_format_is_compressed(plane_format.isl_format)); tiling_flags = ISL_TILING_LINEAR_BIT; @@ -430,7 +430,7 @@ make_surface(const struct anv_device *dev, */ const bool allow_compression = image->n_planes == 1 && - (vk_info->flags & VK_IMAGE_CREATE_ALIAS_BIT_KHR) == 0 && + (vk_info->flags & VK_IMAGE_CREATE_ALIAS_BIT) == 0 && likely((INTEL_DEBUG & DEBUG_NO_RBC) == 0); if (allow_compression) { @@ -585,7 +585,7 @@ anv_image_create(VkDevice _device, image->samples = pCreateInfo->samples; image->usage = pCreateInfo->usage; image->tiling = pCreateInfo->tiling; - image->disjoint = pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_KHR; + image->disjoint = pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT; image->needs_set_tiling = wsi_info && wsi_info->scanout; image->drm_format_mod = isl_mod_info ? isl_mod_info->modifier : DRM_FORMAT_MOD_INVALID; @@ -702,21 +702,21 @@ VkResult anv_BindImageMemory( VkResult anv_BindImageMemory2( VkDevice _device, uint32_t bindInfoCount, - const VkBindImageMemoryInfoKHR* pBindInfos) + const VkBindImageMemoryInfo* pBindInfos) { ANV_FROM_HANDLE(anv_device, device, _device); for (uint32_t i = 0; i < bindInfoCount; i++) { - const VkBindImageMemoryInfoKHR *bind_info = &pBindInfos[i]; + const VkBindImageMemoryInfo *bind_info = &pBindInfos[i]; ANV_FROM_HANDLE(anv_device_memory, mem, bind_info->memory); ANV_FROM_HANDLE(anv_image, image, bind_info->image); VkImageAspectFlags aspects = image->aspects; vk_foreach_struct_const(s, bind_info->pNext) { switch (s->sType) { - case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR: { - const VkBindImagePlaneMemoryInfoKHR *plane_info = - (const VkBindImagePlaneMemoryInfoKHR *) s; + case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: { + const VkBindImagePlaneMemoryInfo *plane_info = + (const VkBindImagePlaneMemoryInfo *) s; aspects = plane_info->planeAspect; break; @@ -848,7 +848,7 @@ anv_layout_to_aux_usage(const struct gen_device_info * const devinfo, /* Sampling Layouts */ case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: - case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR: + case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL: assert((image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0); /* Fall-through */ case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL: @@ -895,7 +895,7 @@ anv_layout_to_aux_usage(const struct gen_device_info * const devinfo, } case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: - case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR: + case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL: assert(aspect == VK_IMAGE_ASPECT_DEPTH_BIT); return ISL_AUX_USAGE_HIZ; @@ -1182,7 +1182,7 @@ remap_aspect_flags(VkImageAspectFlags view_aspects) VkImageAspectFlags color_aspects = 0; for (uint32_t i = 0; i < _mesa_bitcount(view_aspects); i++) - color_aspects |= VK_IMAGE_ASPECT_PLANE_0_BIT_KHR << i; + color_aspects |= VK_IMAGE_ASPECT_PLANE_0_BIT << i; return color_aspects; } /* No special remapping needed for depth & stencil aspects. */ @@ -1209,8 +1209,8 @@ anv_CreateImageView(VkDevice _device, assert(range->layerCount > 0); assert(range->baseMipLevel < image->levels); - const VkImageViewUsageCreateInfoKHR *usage_info = - vk_find_struct_const(pCreateInfo, IMAGE_VIEW_USAGE_CREATE_INFO_KHR); + const VkImageViewUsageCreateInfo *usage_info = + vk_find_struct_const(pCreateInfo, IMAGE_VIEW_USAGE_CREATE_INFO); VkImageUsageFlags view_usage = usage_info ? usage_info->usage : image->usage; /* View usage should be a subset of image usage */ assert((view_usage & ~image->usage) == 0); @@ -1235,8 +1235,8 @@ anv_CreateImageView(VkDevice _device, /* First expand aspects to the image's ones (for example * VK_IMAGE_ASPECT_COLOR_BIT will be converted to - * VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | - * VK_IMAGE_ASPECT_PLANE_2_BIT_KHR for an image of format + * VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT | + * VK_IMAGE_ASPECT_PLANE_2_BIT for an image of format * VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR. */ VkImageAspectFlags expanded_aspects = @@ -1245,7 +1245,7 @@ anv_CreateImageView(VkDevice _device, iview->image = image; /* Remap the expanded aspects for the image view. For example if only - * VK_IMAGE_ASPECT_PLANE_1_BIT_KHR was given in range->aspectMask, we will + * VK_IMAGE_ASPECT_PLANE_1_BIT was given in range->aspectMask, we will * convert it to VK_IMAGE_ASPECT_COLOR_BIT since from the point of view of * the image view, it only has a single plane. */ @@ -1535,17 +1535,17 @@ anv_image_get_surface_for_aspect_mask(const struct anv_image *image, sanitized_mask = VK_IMAGE_ASPECT_STENCIL_BIT; } break; - case VK_IMAGE_ASPECT_PLANE_0_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_0_BIT: assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0); - sanitized_mask = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR; + sanitized_mask = VK_IMAGE_ASPECT_PLANE_0_BIT; break; - case VK_IMAGE_ASPECT_PLANE_1_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_1_BIT: assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0); - sanitized_mask = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR; + sanitized_mask = VK_IMAGE_ASPECT_PLANE_1_BIT; break; - case VK_IMAGE_ASPECT_PLANE_2_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_2_BIT: assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0); - sanitized_mask = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; + sanitized_mask = VK_IMAGE_ASPECT_PLANE_2_BIT; break; default: unreachable("image does not have aspect"); diff --git a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c index ad793ee0a0c..ebf1fd9c267 100644 --- a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c +++ b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c @@ -40,9 +40,9 @@ y_range(nir_builder *b, VkSamplerYcbcrRangeKHR range) { switch (range) { - case VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR: + case VK_SAMPLER_YCBCR_RANGE_ITU_FULL: return y_channel; - case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR: + case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW: return nir_fmul(b, nir_fadd(b, nir_fmul(b, y_channel, @@ -62,10 +62,10 @@ chroma_range(nir_builder *b, VkSamplerYcbcrRangeKHR range) { switch (range) { - case VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR: + case VK_SAMPLER_YCBCR_RANGE_ITU_FULL: return nir_fadd(b, chroma_channel, nir_imm_float(b, -pow(2, bpc - 1) / (pow(2, bpc) - 1.0f))); - case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR: + case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW: return nir_fmul(b, nir_fadd(b, nir_fmul(b, chroma_channel, @@ -82,7 +82,7 @@ static const nir_const_value * ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model) { switch (model) { - case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR: { + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601: { static const nir_const_value bt601[3] = { { .f32 = { 1.402f, 1.0f, 0.0f, 0.0f } }, { .f32 = { -0.714136286201022f, 1.0f, -0.344136286201022f, 0.0f } }, @@ -91,7 +91,7 @@ ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model) return bt601; } - case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR: { + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709: { static const nir_const_value bt709[3] = { { .f32 = { 1.5748031496063f, 1.0f, 0.0, 0.0f } }, { .f32 = { -0.468125209181067f, 1.0f, -0.187327487470334f, 0.0f } }, @@ -100,7 +100,7 @@ ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model) return bt709; } - case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR: { + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020: { static const nir_const_value bt2020[3] = { { .f32 = { 1.4746f, 1.0f, 0.0f, 0.0f } }, { .f32 = { -0.571353126843658f, 1.0f, -0.164553126843658f, 0.0f } }, @@ -133,7 +133,7 @@ convert_ycbcr(struct ycbcr_state *state, bpcs[2], conversion->ycbcr_range), nir_imm_float(b, 1.0f)); - if (conversion->ycbcr_model == VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR) + if (conversion->ycbcr_model == VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY) return expanded_channels; const nir_const_value *conversion_matrix = @@ -206,7 +206,7 @@ implicit_downsampled_coords(struct ycbcr_state *state, for (c = 0; c < ARRAY_SIZE(conversion->chroma_offsets); c++) { if (plane_format->denominator_scales[c] > 1 && - conversion->chroma_offsets[c] == VK_CHROMA_LOCATION_COSITED_EVEN_KHR) { + conversion->chroma_offsets[c] == VK_CHROMA_LOCATION_COSITED_EVEN) { comp[c] = implicit_downsampled_coord(b, nir_channel(b, old_coords, c), nir_channel(b, image_size, c), @@ -430,7 +430,7 @@ try_lower_tex_ycbcr(struct anv_pipeline_layout *layout, } nir_ssa_def *result = nir_vec(builder, swizzled_comp, 4); - if (state.conversion->ycbcr_model != VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR) + if (state.conversion->ycbcr_model != VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY) result = convert_ycbcr(&state, result, swizzled_bpcs); nir_ssa_def_rewrite_uses(&tex->dest.ssa, nir_src_for_ssa(result)); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 72ebd98a900..55bdf365014 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1587,13 +1587,13 @@ anv_pipe_invalidate_bits_for_access_flags(VkAccessFlags flags) #define VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV ( \ VK_IMAGE_ASPECT_COLOR_BIT | \ - VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | \ - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | \ - VK_IMAGE_ASPECT_PLANE_2_BIT_KHR) + VK_IMAGE_ASPECT_PLANE_0_BIT | \ + VK_IMAGE_ASPECT_PLANE_1_BIT | \ + VK_IMAGE_ASPECT_PLANE_2_BIT) #define VK_IMAGE_ASPECT_PLANES_BITS_ANV ( \ - VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | \ - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | \ - VK_IMAGE_ASPECT_PLANE_2_BIT_KHR) + VK_IMAGE_ASPECT_PLANE_0_BIT | \ + VK_IMAGE_ASPECT_PLANE_1_BIT | \ + VK_IMAGE_ASPECT_PLANE_2_BIT) struct anv_vertex_binding { struct anv_buffer * buffer; @@ -2287,15 +2287,15 @@ anv_image_aspect_to_plane(VkImageAspectFlags image_aspects, switch (aspect_mask) { case VK_IMAGE_ASPECT_COLOR_BIT: case VK_IMAGE_ASPECT_DEPTH_BIT: - case VK_IMAGE_ASPECT_PLANE_0_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_0_BIT: return 0; case VK_IMAGE_ASPECT_STENCIL_BIT: if ((image_aspects & VK_IMAGE_ASPECT_DEPTH_BIT) == 0) return 0; /* Fall-through */ - case VK_IMAGE_ASPECT_PLANE_1_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_1_BIT: return 1; - case VK_IMAGE_ASPECT_PLANE_2_BIT_KHR: + case VK_IMAGE_ASPECT_PLANE_2_BIT: return 2; default: /* Purposefully assert with depth/stencil aspects. */ @@ -2311,11 +2311,11 @@ anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask) if (aspect_mask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | - VK_IMAGE_ASPECT_PLANE_0_BIT_KHR)) + VK_IMAGE_ASPECT_PLANE_0_BIT)) planes++; - if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT_KHR) + if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT) planes++; - if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT_KHR) + if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT) planes++; return planes; @@ -2327,7 +2327,7 @@ anv_plane_to_aspect(VkImageAspectFlags image_aspects, { if (image_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) { if (_mesa_bitcount(image_aspects) > 1) - return VK_IMAGE_ASPECT_PLANE_0_BIT_KHR << plane; + return VK_IMAGE_ASPECT_PLANE_0_BIT << plane; return VK_IMAGE_ASPECT_COLOR_BIT; } if (image_aspects & VK_IMAGE_ASPECT_DEPTH_BIT) @@ -2869,10 +2869,10 @@ void anv_fill_buffer_surface_state(struct anv_device *device, struct anv_ycbcr_conversion { const struct anv_format * format; - VkSamplerYcbcrModelConversionKHR ycbcr_model; - VkSamplerYcbcrRangeKHR ycbcr_range; + VkSamplerYcbcrModelConversion ycbcr_model; + VkSamplerYcbcrRange ycbcr_range; VkComponentSwizzle mapping[4]; - VkChromaLocationKHR chroma_offsets[2]; + VkChromaLocation chroma_offsets[2]; VkFilter chroma_filter; bool chroma_reconstruction; }; @@ -3067,7 +3067,7 @@ ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_sampler, VkSampler) ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_semaphore, VkSemaphore) ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_shader_module, VkShaderModule) ANV_DEFINE_NONDISP_HANDLE_CASTS(vk_debug_report_callback, VkDebugReportCallbackEXT) -ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_ycbcr_conversion, VkSamplerYcbcrConversionKHR) +ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_ycbcr_conversion, VkSamplerYcbcrConversion) /* Gen-specific function declarations */ #ifdef genX diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index e57bc795878..b9ca189fddc 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -690,18 +690,18 @@ void anv_GetPhysicalDeviceExternalFenceProperties( ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); switch (pExternalFenceInfo->handleType) { - case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: - case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR: + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT: + case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT: if (device->has_syncobj_wait) { pExternalFenceProperties->exportFromImportedHandleTypes = - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | - VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR; + VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | + VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT; pExternalFenceProperties->compatibleHandleTypes = - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | - VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR; + VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | + VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT; pExternalFenceProperties->externalFenceFeatures = - VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR | - VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR; + VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT | + VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT; return; } break; @@ -731,16 +731,16 @@ VkResult anv_ImportFenceFdKHR( }; switch (pImportFenceFdInfo->handleType) { - case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT: new_impl.type = ANV_FENCE_TYPE_SYNCOBJ; new_impl.syncobj = anv_gem_syncobj_fd_to_handle(device, fd); if (!new_impl.syncobj) - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); break; - case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR: + case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT: /* Sync files are a bit tricky. Because we want to continue using the * syncobj implementation of WaitForFences, we don't use the sync file * directly but instead import it into a syncobj. @@ -754,13 +754,13 @@ VkResult anv_ImportFenceFdKHR( if (anv_gem_syncobj_import_sync_file(device, new_impl.syncobj, fd)) { anv_gem_syncobj_destroy(device, new_impl.syncobj); return vk_errorf(device->instance, NULL, - VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, + VK_ERROR_INVALID_EXTERNAL_HANDLE, "syncobj sync file import failed: %m"); } break; default: - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } /* From the Vulkan 1.0.53 spec: @@ -774,7 +774,7 @@ VkResult anv_ImportFenceFdKHR( */ close(fd); - if (pImportFenceFdInfo->flags & VK_FENCE_IMPORT_TEMPORARY_BIT_KHR) { + if (pImportFenceFdInfo->flags & VK_FENCE_IMPORT_TEMPORARY_BIT) { anv_fence_impl_cleanup(device, &fence->temporary); fence->temporary = new_impl; } else { @@ -801,7 +801,7 @@ VkResult anv_GetFenceFdKHR( assert(impl->type == ANV_FENCE_TYPE_SYNCOBJ); switch (pGetFdInfo->handleType) { - case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: { + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT: { int fd = anv_gem_syncobj_handle_to_fd(device, impl->syncobj); if (fd < 0) return vk_error(VK_ERROR_TOO_MANY_OBJECTS); @@ -810,7 +810,7 @@ VkResult anv_GetFenceFdKHR( break; } - case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR: { + case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT: { int fd = anv_gem_syncobj_export_sync_file(device, impl->syncobj); if (fd < 0) return vk_error(VK_ERROR_TOO_MANY_OBJECTS); @@ -855,7 +855,7 @@ VkResult anv_CreateSemaphore( return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); const VkExportSemaphoreCreateInfoKHR *export = - vk_find_struct_const(pCreateInfo->pNext, EXPORT_SEMAPHORE_CREATE_INFO_KHR); + vk_find_struct_const(pCreateInfo->pNext, EXPORT_SEMAPHORE_CREATE_INFO); VkExternalSemaphoreHandleTypeFlagsKHR handleTypes = export ? export->handleTypes : 0; @@ -865,8 +865,8 @@ VkResult anv_CreateSemaphore( * queue, a dummy no-op semaphore is a perfectly valid implementation. */ semaphore->permanent.type = ANV_SEMAPHORE_TYPE_DUMMY; - } else if (handleTypes & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR) { - assert(handleTypes == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR); + } else if (handleTypes & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) { + assert(handleTypes == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT); if (device->instance->physicalDevice.has_syncobj) { semaphore->permanent.type = ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ; semaphore->permanent.syncobj = anv_gem_syncobj_create(device, 0); @@ -888,15 +888,15 @@ VkResult anv_CreateSemaphore( */ assert(!(semaphore->permanent.bo->flags & EXEC_OBJECT_ASYNC)); } - } else if (handleTypes & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { - assert(handleTypes == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR); + } else if (handleTypes & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT) { + assert(handleTypes == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT); semaphore->permanent.type = ANV_SEMAPHORE_TYPE_SYNC_FILE; semaphore->permanent.fd = -1; } else { assert(!"Unknown handle type"); vk_free2(&device->alloc, pAllocator, semaphore); - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } semaphore->temporary.type = ANV_SEMAPHORE_TYPE_NONE; @@ -968,24 +968,24 @@ void anv_GetPhysicalDeviceExternalSemaphoreProperties( ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); switch (pExternalSemaphoreInfo->handleType) { - case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT: pExternalSemaphoreProperties->exportFromImportedHandleTypes = - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT; pExternalSemaphoreProperties->compatibleHandleTypes = - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT; pExternalSemaphoreProperties->externalSemaphoreFeatures = - VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR | - VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR; + VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT | + VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT; return; - case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR: + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT: if (device->has_exec_fence) { pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0; pExternalSemaphoreProperties->compatibleHandleTypes = - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR; + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT; pExternalSemaphoreProperties->externalSemaphoreFeatures = - VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR | - VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR; + VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT | + VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT; return; } break; @@ -1012,13 +1012,13 @@ VkResult anv_ImportSemaphoreFdKHR( }; switch (pImportSemaphoreFdInfo->handleType) { - case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT: if (device->instance->physicalDevice.has_syncobj) { new_impl.type = ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ; new_impl.syncobj = anv_gem_syncobj_fd_to_handle(device, fd); if (!new_impl.syncobj) - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } else { new_impl.type = ANV_SEMAPHORE_TYPE_BO; @@ -1050,7 +1050,7 @@ VkResult anv_ImportSemaphoreFdKHR( close(fd); break; - case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR: + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT: new_impl = (struct anv_semaphore_impl) { .type = ANV_SEMAPHORE_TYPE_SYNC_FILE, .fd = fd, @@ -1058,10 +1058,10 @@ VkResult anv_ImportSemaphoreFdKHR( break; default: - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } - if (pImportSemaphoreFdInfo->flags & VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR) { + if (pImportSemaphoreFdInfo->flags & VK_SEMAPHORE_IMPORT_TEMPORARY_BIT) { anv_semaphore_impl_cleanup(device, &semaphore->temporary); semaphore->temporary = new_impl; } else { @@ -1131,7 +1131,7 @@ VkResult anv_GetSemaphoreFdKHR( break; default: - return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR); + return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE); } /* From the Vulkan 1.0.53 spec: diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index f39508034f5..c6e54046910 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -253,9 +253,9 @@ VkResult genX(CreateSampler)( vk_foreach_struct(ext, pCreateInfo->pNext) { switch (ext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR: { - VkSamplerYcbcrConversionInfoKHR *pSamplerConversion = - (VkSamplerYcbcrConversionInfoKHR *) ext; + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: { + VkSamplerYcbcrConversionInfo *pSamplerConversion = + (VkSamplerYcbcrConversionInfo *) ext; ANV_FROM_HANDLE(anv_ycbcr_conversion, conversion, pSamplerConversion->conversion); diff --git a/src/intel/vulkan/vk_format_info.h b/src/intel/vulkan/vk_format_info.h index 167938ac109..a1cc6952c8f 100644 --- a/src/intel/vulkan/vk_format_info.h +++ b/src/intel/vulkan/vk_format_info.h @@ -47,32 +47,32 @@ vk_format_aspects(VkFormat format) case VK_FORMAT_D32_SFLOAT: return VK_IMAGE_ASPECT_DEPTH_BIT; - case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR: - case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR: - case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR: - case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR: - case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR: - case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR: - case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR: - case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR: - case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR: - case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR: - case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR: - case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR: - return (VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | - VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + return (VK_IMAGE_ASPECT_PLANE_0_BIT | + VK_IMAGE_ASPECT_PLANE_1_BIT | + VK_IMAGE_ASPECT_PLANE_2_BIT); - case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR: - case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR: - case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR: - case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR: - case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR: - case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR: - case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR: - case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR: - return (VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: + return (VK_IMAGE_ASPECT_PLANE_0_BIT | + VK_IMAGE_ASPECT_PLANE_1_BIT); default: return VK_IMAGE_ASPECT_COLOR_BIT; |