From b99f94a7ffab0698f209bf1b39d337940bc40e50 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Mon, 28 Aug 2023 01:37:40 +0200 Subject: Vulkan: add temporary workaround for AMDVLK --- src/video_core/vulkan_common/vulkan_device.cpp | 7 +++++++ src/video_core/vulkan_common/vulkan_device.h | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/video_core/vulkan_common') diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 617417040..835a1338b 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1051,6 +1051,13 @@ void Device::RemoveUnsuitableExtensions() { RemoveExtensionFeatureIfUnsuitable(extensions.custom_border_color, features.custom_border_color, VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); + // VK_EXT_depth_bias_control + extensions.depth_bias_control = + features.depth_bias_control.depthBiasControl && + features.depth_bias_control.leastRepresentableValueForceUnormRepresentation; + RemoveExtensionFeatureIfUnsuitable(extensions.depth_bias_control, features.depth_bias_control, + VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME); + // VK_EXT_depth_clip_control extensions.depth_clip_control = features.depth_clip_control.depthClipControl; RemoveExtensionFeatureIfUnsuitable(extensions.depth_clip_control, features.depth_clip_control, diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 2063f58b5..eb314fe33 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -456,8 +456,7 @@ public: /// Returns true if the device supports VK_EXT_depth_bias_control. bool IsExtDepthBiasControlSupported() const { - return extensions.depth_bias_control && features.depth_bias_control.depthBiasControl && - features.depth_bias_control.leastRepresentableValueForceUnormRepresentation; + return extensions.depth_bias_control; } /// Returns true if the device supports VK_EXT_shader_viewport_index_layer. -- cgit v1.2.3