[vk, qcom] Shader Float Control changed handling

This commit is contained in:
CamilleLaVey 2025-11-29 12:11:19 -04:00 committed by Caio Oliveira
parent 4bcf2106d5
commit 7bb41a9dfb
3 changed files with 20 additions and 18 deletions

View file

@ -508,13 +508,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
"Qualcomm drivers require scaled vertex format emulation; forcing fallback");
LOG_WARNING(Render_Vulkan,
"Disabling shader float controls and 64-bit integer features on Qualcomm proprietary drivers");
RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);
if (extensions.spirv_1_4) {
LOG_WARNING(Render_Vulkan,
"VK_KHR_spirv_1_4 depends on VK_KHR_shader_float_controls; disabling both on Qualcomm");
RemoveExtension(extensions.spirv_1_4, VK_KHR_SPIRV_1_4_EXTENSION_NAME);
}
"Qualcomm proprietary drivers report VK_KHR_shader_float_controls but remain unreliable;"
" disabling usage while keeping the extension enabled");
disable_shader_float_controls_usage = true;
RemoveExtensionFeature(extensions.shader_atomic_int64, features.shader_atomic_int64,
VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME);
features.shader_atomic_int64.shaderBufferInt64Atomics = false;

View file

@ -503,7 +503,7 @@ public:
/// Returns true if VK_KHR_shader_float_controls is enabled.
bool IsKhrShaderFloatControlsSupported() const {
return extensions.shader_float_controls;
return extensions.shader_float_controls && !disable_shader_float_controls_usage;
}
/// Returns true if the device supports VK_KHR_workgroup_memory_explicit_layout.
@ -1090,6 +1090,7 @@ private:
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
bool must_emulate_scaled_formats{}; ///< Requires scaled vertex format emulation
bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format.
bool disable_shader_float_controls_usage{}; ///< True when VK_KHR_shader_float_controls cannot be safely used.
bool use_mobile_megabuffer{}; ///< Use the Android mega buffer path.
bool dynamic_state3_blending{}; ///< Has blending features of dynamic_state3.
bool dynamic_state3_enables{}; ///< Has at least one enable feature of dynamic_state3.