diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-10 23:21:28 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:31 +0200 |
commit | c4fd6b55bc9acd06b2fc89f84fd175d78e14110a (patch) | |
tree | c246a1c64f4826faedcf5c93be778116e48caf85 /src/shader_recompiler/backend/spirv | |
parent | glasm: Add MUFU instructions to GLASM (diff) | |
download | yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.gz yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.bz2 yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.lz yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.xz yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.tar.zst yuzu-c4fd6b55bc9acd06b2fc89f84fd175d78e14110a.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 2 | ||||
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index be88b76f7..9759591bd 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp @@ -1168,7 +1168,7 @@ void EmitContext::DefineInputs(const Info& info) { subgroup_mask_gt = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGtMaskKHR); subgroup_mask_ge = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGeMaskKHR); } - if (info.uses_subgroup_invocation_id || + if (info.uses_subgroup_invocation_id || info.uses_subgroup_shuffles || (profile.warp_size_potentially_larger_than_guest && (info.uses_subgroup_vote || info.uses_subgroup_mask))) { subgroup_local_invocation_id = diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 0681dfd16..2dad87e87 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -318,7 +318,9 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct ctx.AddExtension("SPV_KHR_shader_draw_parameters"); ctx.AddCapability(spv::Capability::DrawParameters); } - if ((info.uses_subgroup_vote || info.uses_subgroup_invocation_id) && profile.support_vote) { + if ((info.uses_subgroup_vote || info.uses_subgroup_invocation_id || + info.uses_subgroup_shuffles) && + profile.support_vote) { ctx.AddExtension("SPV_KHR_shader_ballot"); ctx.AddCapability(spv::Capability::SubgroupBallotKHR); if (!profile.warp_size_potentially_larger_than_guest) { |