diff options
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 | |||
| 402 | ctx.AddCapability(spv::Capability::SparseResidency); | 402 | ctx.AddCapability(spv::Capability::SparseResidency); |
| 403 | } | 403 | } |
| 404 | if (info.uses_demote_to_helper_invocation && profile.support_demote_to_helper_invocation) { | 404 | if (info.uses_demote_to_helper_invocation && profile.support_demote_to_helper_invocation) { |
| 405 | ctx.AddExtension("SPV_EXT_demote_to_helper_invocation"); | 405 | if (profile.supported_spirv < 0x00010600) { |
| 406 | ctx.AddCapability(spv::Capability::DemoteToHelperInvocationEXT); | 406 | ctx.AddExtension("SPV_EXT_demote_to_helper_invocation"); |
| 407 | } | ||
| 408 | ctx.AddCapability(spv::Capability::DemoteToHelperInvocation); | ||
| 407 | } | 409 | } |
| 408 | if (info.stores[IR::Attribute::ViewportIndex]) { | 410 | if (info.stores[IR::Attribute::ViewportIndex]) { |
| 409 | ctx.AddCapability(spv::Capability::MultiViewport); | 411 | ctx.AddCapability(spv::Capability::MultiViewport); |
| @@ -426,12 +428,11 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct | |||
| 426 | if ((info.uses_subgroup_vote || info.uses_subgroup_invocation_id || | 428 | if ((info.uses_subgroup_vote || info.uses_subgroup_invocation_id || |
| 427 | info.uses_subgroup_shuffles) && | 429 | info.uses_subgroup_shuffles) && |
| 428 | profile.support_vote) { | 430 | profile.support_vote) { |
| 429 | ctx.AddExtension("SPV_KHR_shader_ballot"); | 431 | ctx.AddCapability(spv::Capability::GroupNonUniformBallot); |
| 430 | ctx.AddCapability(spv::Capability::SubgroupBallotKHR); | 432 | ctx.AddCapability(spv::Capability::GroupNonUniformShuffle); |
| 431 | if (!profile.warp_size_potentially_larger_than_guest) { | 433 | if (!profile.warp_size_potentially_larger_than_guest) { |
| 432 | // vote ops are only used when not taking the long path | 434 | // vote ops are only used when not taking the long path |
| 433 | ctx.AddExtension("SPV_KHR_subgroup_vote"); | 435 | ctx.AddCapability(spv::Capability::GroupNonUniformVote); |
| 434 | ctx.AddCapability(spv::Capability::SubgroupVoteKHR); | ||
| 435 | } | 436 | } |
| 436 | } | 437 | } |
| 437 | if (info.uses_int64_bit_atomics && profile.support_int64_atomics) { | 438 | if (info.uses_int64_bit_atomics && profile.support_int64_atomics) { |