diff options
| author | 2021-05-15 18:17:03 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:31 -0400 | |
| commit | 464f13fe0b65a6908086c91e0d3a97d74494a576 (patch) | |
| tree | 8ab2d48a7360c2af554c9ee4e36b45c6a00d4d6b /src/shader_recompiler/backend/glasm | |
| parent | glasm: Initial (broken) implementation of TEX on GLASM (diff) | |
| download | yuzu-464f13fe0b65a6908086c91e0d3a97d74494a576.tar.gz yuzu-464f13fe0b65a6908086c91e0d3a97d74494a576.tar.xz yuzu-464f13fe0b65a6908086c91e0d3a97d74494a576.zip | |
glasm: Implement derivative instructions on GLASM
Diffstat (limited to 'src/shader_recompiler/backend/glasm')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | 8 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h index e7af8fa88..9f76fc6c2 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h +++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | |||
| @@ -611,9 +611,9 @@ void EmitShuffleDown(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU3 | |||
| 611 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU32 index, | 611 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU32 index, |
| 612 | const IR::Value& clamp, const IR::Value& segmentation_mask); | 612 | const IR::Value& clamp, const IR::Value& segmentation_mask); |
| 613 | void EmitFSwizzleAdd(EmitContext& ctx, ScalarF32 op_a, ScalarF32 op_b, ScalarU32 swizzle); | 613 | void EmitFSwizzleAdd(EmitContext& ctx, ScalarF32 op_a, ScalarF32 op_b, ScalarU32 swizzle); |
| 614 | void EmitDPdxFine(EmitContext& ctx, ScalarF32 op_a); | 614 | void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a); |
| 615 | void EmitDPdyFine(EmitContext& ctx, ScalarF32 op_a); | 615 | void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a); |
| 616 | void EmitDPdxCoarse(EmitContext& ctx, ScalarF32 op_a); | 616 | void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a); |
| 617 | void EmitDPdyCoarse(EmitContext& ctx, ScalarF32 op_a); | 617 | void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a); |
| 618 | 618 | ||
| 619 | } // namespace Shader::Backend::GLASM | 619 | } // namespace Shader::Backend::GLASM |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp index 37eb577cd..0f987daeb 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp | |||
| @@ -99,20 +99,20 @@ void EmitFSwizzleAdd(EmitContext&, ScalarF32, ScalarF32, ScalarU32) { | |||
| 99 | throw NotImplementedException("GLASM instruction"); | 99 | throw NotImplementedException("GLASM instruction"); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | void EmitDPdxFine(EmitContext&, ScalarF32) { | 102 | void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { |
| 103 | throw NotImplementedException("GLASM instruction"); | 103 | ctx.Add("DDX.FINE {}.x,{};", inst, p); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | void EmitDPdyFine(EmitContext&, ScalarF32) { | 106 | void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { |
| 107 | throw NotImplementedException("GLASM instruction"); | 107 | ctx.Add("DDY.FINE {}.x,{};", inst, p); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void EmitDPdxCoarse(EmitContext&, ScalarF32) { | 110 | void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { |
| 111 | throw NotImplementedException("GLASM instruction"); | 111 | ctx.Add("DDX.COARSE {}.x,{};", inst, p); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | void EmitDPdyCoarse(EmitContext&, ScalarF32) { | 114 | void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) { |
| 115 | throw NotImplementedException("GLASM instruction"); | 115 | ctx.Add("DDY.COARSE {}.x,{};", inst, p); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | } // namespace Shader::Backend::GLASM | 118 | } // namespace Shader::Backend::GLASM |