diff options
| author | TellowKrinkle <tellowkrinkle@gmail.com> | 2023-05-17 19:28:27 -0500 |
|---|---|---|
| committer | TellowKrinkle <tellowkrinkle@gmail.com> | 2024-01-28 23:20:39 -0600 |
| commit | 463269f704954d71ed4110fe4357f9249ac6ccab (patch) | |
| tree | 0e99087cca3e4b37e6f745e3e4f660391eaf0d0c /Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp | |
| parent | 6243e50b2123a39470861403147724ab91444d90 (diff) | |
VideoBackends:Multiple: Split up BUG_BROKEN_SUBGROUP_OPS
We now use subgroup ops for more than just a minor performance optimization
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp index ab9b015cec..86826f7280 100644 --- a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp +++ b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp @@ -7,6 +7,7 @@ #include <string> #include "VideoBackends/Vulkan/VulkanContext.h" +#include "VideoCommon/DriverDetails.h" #include "VideoCommon/Spirv.h" namespace Vulkan::ShaderCompiler @@ -98,6 +99,13 @@ static std::string GetShaderCode(std::string_view source, std::string_view heade full_source_code.append(header); if (g_vulkan_context->SupportsShaderSubgroupOperations()) full_source_code.append(SUBGROUP_HELPER_HEADER, subgroup_helper_header_length); + if (DriverDetails::HasBug(DriverDetails::BUG_INVERTED_IS_HELPER)) + { + full_source_code.append("#define gl_HelperInvocation !gl_HelperInvocation " + "// Work around broken AMD Metal driver\n"); + } + if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_SUBGROUP_OPS_WITH_DISCARD)) + full_source_code.append("#define BROKEN_SUBGROUP_WITH_DISCARD 1\n"); full_source_code.append(source); } |
