From 17fd5aa3b6f86012a737832ecd8f9c0d9e72c6cd Mon Sep 17 00:00:00 2001 From: JPikachu Date: Tue, 29 Apr 2025 00:59:40 +0100 Subject: [PATCH] vulkan_device: Dynamically control scaled format emulation based on dynamic state setting fixing the "0" option If the setting dyna_state is set to 0 (dynamic state disabled), must_emulate_scaled_formats is forced "true" for proper rendering. If dyna_state is set to 1, 2, or 3 (dynamic state enabled), must_emulate_scaled_formats is forced "false" for proper dyna-state use. This change applies globally after all device-specific quirks and is logged clearly at boot for easier debugging. --- src/video_core/vulkan_common/vulkan_device.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 9426d31faf..5ac807b908 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -497,6 +497,15 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_WARNING(Render_Vulkan, "Qualcomm drivers have a slow VK_KHR_push_descriptor implementation"); RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } + + if (Settings::values.dyna_state.GetValue() == 0) { + must_emulate_scaled_formats = true; + LOG_INFO(Render_Vulkan, "Dynamic state is disabled (dyna_state = 0), forcing scaled format emulation ON"); + } else { + must_emulate_scaled_formats = false; + LOG_INFO(Render_Vulkan, "Dynamic state is enabled (dyna_state = 1-3), disabling scaled format emulation"); + } #if defined(ANDROID) && defined(ARCHITECTURE_arm64) // Patch the driver to enable BCn textures.