diff options
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp index 0f987daeb..af0e13d43 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp | |||
| @@ -95,8 +95,17 @@ void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, Sca | |||
| 95 | Shuffle(ctx, inst, value, index, clamp, segmentation_mask, "XOR"); | 95 | Shuffle(ctx, inst, value, index, clamp, segmentation_mask, "XOR"); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void EmitFSwizzleAdd(EmitContext&, ScalarF32, ScalarF32, ScalarU32) { | 98 | void EmitFSwizzleAdd(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a, ScalarF32 op_b, |
| 99 | throw NotImplementedException("GLASM instruction"); | 99 | ScalarU32 swizzle) { |
| 100 | const auto ret{ctx.reg_alloc.Define(inst)}; | ||
| 101 | ctx.Add("AND.U RC.z,{}.threadid,3;" | ||
| 102 | "SHL.U RC.z,RC.z,1;" | ||
| 103 | "SHR.U RC.z,{},RC.z;" | ||
| 104 | "AND.U RC.z,RC.z,3;" | ||
| 105 | "MUL.F RC.x,{},FSWZA[RC.z];" | ||
| 106 | "MUL.F RC.y,{},FSWZB[RC.z];" | ||
| 107 | "ADD.F {}.x,RC.x,RC.y;", | ||
| 108 | ctx.stage_name, swizzle, op_a, op_b, ret); | ||
| 100 | } | 109 | } |
| 101 | 110 | ||
| 102 | void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { | 111 | void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { |