diff options
author | Matías Locatti <42481638+goldenx86@users.noreply.github.com> | 2022-12-02 22:32:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 22:32:54 +0100 |
commit | c043ba84675794b37c42ac47b2776dc57d63decb (patch) | |
tree | 479743223a7103a600bf162fffa0203c9f92232d /src/shader_recompiler/backend/spirv/emit_spirv.cpp | |
parent | Merge pull request #9363 from liamwhite/gs (diff) | |
parent | Vulkan: update initialization (diff) | |
download | yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar.gz yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar.bz2 yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar.lz yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar.xz yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.tar.zst yuzu-c043ba84675794b37c42ac47b2776dc57d63decb.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 265ac9c85..0f86a8004 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -402,8 +402,10 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct ctx.AddCapability(spv::Capability::SparseResidency); } if (info.uses_demote_to_helper_invocation && profile.support_demote_to_helper_invocation) { - ctx.AddExtension("SPV_EXT_demote_to_helper_invocation"); - ctx.AddCapability(spv::Capability::DemoteToHelperInvocationEXT); + if (profile.supported_spirv < 0x00010600) { + ctx.AddExtension("SPV_EXT_demote_to_helper_invocation"); + } + ctx.AddCapability(spv::Capability::DemoteToHelperInvocation); } if (info.stores[IR::Attribute::ViewportIndex]) { ctx.AddCapability(spv::Capability::MultiViewport); @@ -426,12 +428,11 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct 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); + ctx.AddCapability(spv::Capability::GroupNonUniformBallot); + ctx.AddCapability(spv::Capability::GroupNonUniformShuffle); if (!profile.warp_size_potentially_larger_than_guest) { // vote ops are only used when not taking the long path - ctx.AddExtension("SPV_KHR_subgroup_vote"); - ctx.AddCapability(spv::Capability::SubgroupVoteKHR); + ctx.AddCapability(spv::Capability::GroupNonUniformVote); } } if (info.uses_int64_bit_atomics && profile.support_int64_atomics) { |