diff options
| author | 2021-04-18 20:47:31 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:28 -0400 | |
| commit | 5b8afed87115c82cb48913fd47dfbfa347e4faa5 (patch) | |
| tree | 84eff714b71e1f3e5f1b9436e877327480144b0b /src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp | |
| parent | shader: Address feedback (diff) | |
| download | yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.gz yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.xz yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.zip | |
spirv: Replace Constant/ConstantComposite with Const helper
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp index a255f9ba7..239e2ecab 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp | |||
| @@ -54,7 +54,7 @@ Id EmitLaneId(EmitContext& ctx) { | |||
| 54 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { | 54 | if (!ctx.profile.warp_size_potentially_larger_than_guest) { |
| 55 | return id; | 55 | return id; |
| 56 | } | 56 | } |
| 57 | return ctx.OpBitwiseAnd(ctx.U32[1], id, ctx.Constant(ctx.U32[1], 31U)); | 57 | return ctx.OpBitwiseAnd(ctx.U32[1], id, ctx.Const(31U)); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | Id EmitVoteAll(EmitContext& ctx, Id pred) { | 60 | Id EmitVoteAll(EmitContext& ctx, Id pred) { |
| @@ -168,10 +168,10 @@ Id EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, Id value, Id index, Id | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | Id EmitFSwizzleAdd(EmitContext& ctx, Id op_a, Id op_b, Id swizzle) { | 170 | Id EmitFSwizzleAdd(EmitContext& ctx, Id op_a, Id op_b, Id swizzle) { |
| 171 | const Id three{ctx.Constant(ctx.U32[1], 3)}; | 171 | const Id three{ctx.Const(3U)}; |
| 172 | Id mask{ctx.OpLoad(ctx.U32[1], ctx.subgroup_local_invocation_id)}; | 172 | Id mask{ctx.OpLoad(ctx.U32[1], ctx.subgroup_local_invocation_id)}; |
| 173 | mask = ctx.OpBitwiseAnd(ctx.U32[1], mask, three); | 173 | mask = ctx.OpBitwiseAnd(ctx.U32[1], mask, three); |
| 174 | mask = ctx.OpShiftLeftLogical(ctx.U32[1], mask, ctx.Constant(ctx.U32[1], 1)); | 174 | mask = ctx.OpShiftLeftLogical(ctx.U32[1], mask, ctx.Const(1U)); |
| 175 | mask = ctx.OpShiftRightLogical(ctx.U32[1], swizzle, mask); | 175 | mask = ctx.OpShiftRightLogical(ctx.U32[1], swizzle, mask); |
| 176 | mask = ctx.OpBitwiseAnd(ctx.U32[1], mask, three); | 176 | mask = ctx.OpBitwiseAnd(ctx.U32[1], mask, three); |
| 177 | 177 | ||