radv: update VK_EXT_sampler_filter_minmax for Vulkan 1.2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 15 Oct 2019 06:58:55 +0000 (08:58 +0200)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 15 Jan 2020 14:42:25 +0000 (08:42 -0600)
Promoted to Vulkan 1.2 with the EXT suffix omitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_formats.c

index d39ff6c3c4d5d6f824753b17f019454d9cb4346e..ff13daf9851ea801c8af7a910407846b1f43e11f 100644 (file)
@@ -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);
 
index 01917875528b2052e26e12cfa19b39d4503e6645..b5d1fa31ba7c8e83c95dd402280c7eaa73e2fc10 100644 (file)
@@ -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;