From: Samuel Pitoiset Date: Tue, 15 Oct 2019 06:58:55 +0000 (+0200) Subject: radv: update VK_EXT_sampler_filter_minmax for Vulkan 1.2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efdf9d8969a88341660e609744d18061b289c7d3;p=mesa.git radv: update VK_EXT_sampler_filter_minmax for Vulkan 1.2 Promoted to Vulkan 1.2 with the EXT suffix omitted. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index d39ff6c3c4d..ff13daf9851 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1437,9 +1437,9 @@ void radv_GetPhysicalDeviceProperties2( properties->maxMemoryAllocationSize = RADV_MAX_MEMORY_ALLOCATION_SIZE; break; } - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: { - VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT *properties = - (VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT *)ext; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: { + VkPhysicalDeviceSamplerFilterMinmaxProperties *properties = + (VkPhysicalDeviceSamplerFilterMinmaxProperties *)ext; /* GFX6-8 only support single channel min/max filter. */ properties->filterMinmaxImageComponentMapping = pdevice->rad_info.chip_class >= GFX9; properties->filterMinmaxSingleComponentFormats = true; @@ -6661,7 +6661,7 @@ radv_tex_aniso_filter(unsigned filter) } static unsigned -radv_tex_filter_mode(VkSamplerReductionModeEXT mode) +radv_tex_filter_mode(VkSamplerReductionMode mode) { switch (mode) { case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT: @@ -6702,9 +6702,9 @@ radv_init_sampler(struct radv_device *device, unsigned filter_mode = V_008F30_SQ_IMG_FILTER_MODE_BLEND; unsigned depth_compare_func = V_008F30_SQ_TEX_DEPTH_COMPARE_NEVER; - const struct VkSamplerReductionModeCreateInfoEXT *sampler_reduction = + const struct VkSamplerReductionModeCreateInfo *sampler_reduction = vk_find_struct_const(pCreateInfo->pNext, - SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT); + SAMPLER_REDUCTION_MODE_CREATE_INFO); if (sampler_reduction) filter_mode = radv_tex_filter_mode(sampler_reduction->reductionMode); diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 01917875528..b5d1fa31ba7 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -595,7 +595,7 @@ static bool radv_is_filter_minmax_format_supported(VkFormat format) /* From the Vulkan spec 1.1.71: * * "The following formats must support the - * VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT feature with + * VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT feature with * VK_IMAGE_TILING_OPTIMAL, if they support * VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT." */ @@ -694,7 +694,7 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical VK_FORMAT_FEATURE_TRANSFER_DST_BIT; if (radv_is_filter_minmax_format_supported(format)) - tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT; + tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT; /* Don't support blitting surfaces with depth/stencil. */ if (vk_format_is_depth(format) && vk_format_is_stencil(format)) @@ -712,7 +712,7 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical VK_FORMAT_FEATURE_BLIT_SRC_BIT; if (radv_is_filter_minmax_format_supported(format)) - tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT; + tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT; if (linear_sampling) { linear |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;