From fce9c5fd25c66558eb8ed4e9e5ca9129589a5e7d Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Sun, 1 Nov 2026 02:08:04 -0500 Subject: vulkan_device: tell AMD GCN4 apart before float16 is turned off AMD GCN4 and older are recognised by their lack of float16. Since float16 is turned off for every non-Mesa AMD driver (2026+ versions break it), the sampler min/max check that runs after that saw every AMD GPU as GCN4 and removed VK_EXT_sampler_filter_minmax: a Radeon 780M (RDNA3) logged "AMD GCN4 and earlier have broken VK_EXT_sampler_filter_minmax", and samplers with a min/max reduction fell back to plain filtering there. Read it once, before float16 is turned off. --- src/video_core/vulkan_common/vulkan_device.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index c1a40e7906..b65c721bb8 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -620,12 +620,16 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } sets_per_pool = 64; + // AMD GCN4 and older are told apart by their lack of float16, read before float16 is turned + // off for newer AMD drivers below: checked after that, every AMD GPU looked like GCN4 and lost + // VK_EXT_sampler_filter_minmax (an RDNA3 Radeon 780M logged it). + const bool amd_gcn4_or_older = is_amd && !features.shader_float16_int8.shaderFloat16; if (is_amd_driver) { // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. sets_per_pool = 96; // Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken. - if (!features.shader_float16_int8.shaderFloat16) { + if (amd_gcn4_or_older) { LOG_WARNING(Render_Vulkan, "AMD GCN4 and earlier have broken VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT"); has_broken_cube_compatibility = true; @@ -641,7 +645,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR if (extensions.sampler_filter_minmax && is_amd) { // Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken. - if (!features.shader_float16_int8.shaderFloat16) { + if (amd_gcn4_or_older) { LOG_WARNING(Render_Vulkan, "AMD GCN4 and earlier have broken VK_EXT_sampler_filter_minmax"); RemoveExtension(extensions.sampler_filter_minmax, -- cgit v1.2.3