diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp index 8a018acb5..4286f29c7 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp | |||
| @@ -45,8 +45,8 @@ void EmitVoteAll(EmitContext& ctx, IR::Inst& inst, std::string_view pred) { | |||
| 45 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { | 45 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { |
| 46 | ctx.AddU1("{}=allInvocationsEqualARB({});", inst, pred); | 46 | ctx.AddU1("{}=allInvocationsEqualARB({});", inst, pred); |
| 47 | } else { | 47 | } else { |
| 48 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubgroupInvocationID]")}; | 48 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubGroupInvocationARB]")}; |
| 49 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubgroupInvocationID]", pred)}; | 49 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubGroupInvocationARB]", pred)}; |
| 50 | ctx.AddU1("{}=({}&{})=={};", inst, ballot, active_mask, active_mask); | 50 | ctx.AddU1("{}=({}&{})=={};", inst, ballot, active_mask, active_mask); |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| @@ -55,8 +55,8 @@ void EmitVoteAny(EmitContext& ctx, IR::Inst& inst, std::string_view pred) { | |||
| 55 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { | 55 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { |
| 56 | ctx.AddU1("{}=anyInvocationARB({});", inst, pred); | 56 | ctx.AddU1("{}=anyInvocationARB({});", inst, pred); |
| 57 | } else { | 57 | } else { |
| 58 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubgroupInvocationID]")}; | 58 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubGroupInvocationARB]")}; |
| 59 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubgroupInvocationID]", pred)}; | 59 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubGroupInvocationARB]", pred)}; |
| 60 | ctx.AddU1("{}=({}&{})!=0u;", inst, ballot, active_mask, active_mask); | 60 | ctx.AddU1("{}=({}&{})!=0u;", inst, ballot, active_mask, active_mask); |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| @@ -65,8 +65,8 @@ void EmitVoteEqual(EmitContext& ctx, IR::Inst& inst, std::string_view pred) { | |||
| 65 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { | 65 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { |
| 66 | ctx.AddU1("{}=allInvocationsEqualARB({});", inst, pred); | 66 | ctx.AddU1("{}=allInvocationsEqualARB({});", inst, pred); |
| 67 | } else { | 67 | } else { |
| 68 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubgroupInvocationID]")}; | 68 | const auto active_mask{fmt::format("uvec2(ballotARB(true))[gl_SubGroupInvocationARB]")}; |
| 69 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubgroupInvocationID]", pred)}; | 69 | const auto ballot{fmt::format("uvec2(ballotARB({}))[gl_SubGroupInvocationARB]", pred)}; |
| 70 | const auto value{fmt::format("({}^{})", ballot, active_mask)}; | 70 | const auto value{fmt::format("({}^{})", ballot, active_mask)}; |
| 71 | ctx.AddU1("{}=({}==0)||({}=={});", inst, value, value, active_mask); | 71 | ctx.AddU1("{}=({}==0)||({}=={});", inst, value, value, active_mask); |
| 72 | } | 72 | } |
| @@ -76,7 +76,7 @@ void EmitSubgroupBallot(EmitContext& ctx, IR::Inst& inst, std::string_view pred) | |||
| 76 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { | 76 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { |
| 77 | ctx.AddU32("{}=uvec2(ballotARB({})).x;", inst, pred); | 77 | ctx.AddU32("{}=uvec2(ballotARB({})).x;", inst, pred); |
| 78 | } else { | 78 | } else { |
| 79 | ctx.AddU32("{}=uvec2(ballotARB({}))[gl_SubgroupInvocationID];", inst, pred); | 79 | ctx.AddU32("{}=uvec2(ballotARB({}))[gl_SubGroupInvocationARB];", inst, pred); |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | 82 | ||