diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp index 2e1c7d55f..84028e01a 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp | |||
| @@ -36,11 +36,11 @@ void Compare(EmitContext& ctx, IR::Inst& inst, InputType lhs, InputType rhs, std | |||
| 36 | 36 | ||
| 37 | template <typename InputType> | 37 | template <typename InputType> |
| 38 | void Clamp(EmitContext& ctx, Register ret, InputType value, InputType min_value, | 38 | void Clamp(EmitContext& ctx, Register ret, InputType value, InputType min_value, |
| 39 | InputType max_value) { | 39 | InputType max_value, std::string_view type) { |
| 40 | // Call MAX first to properly clamp nan to min_value instead | 40 | // Call MAX first to properly clamp nan to min_value instead |
| 41 | ctx.Add("MAX.F {}.x,{},{};" | 41 | ctx.Add("MAX.{} {}.x,{},{};" |
| 42 | "MIN.F {}.x,{},{};", | 42 | "MIN.{} {}.x,{}.x,{};", |
| 43 | ret, min_value, value, ret, ret, max_value); | 43 | type, ret, min_value, value, type, ret, ret, max_value); |
| 44 | } | 44 | } |
| 45 | } // Anonymous namespace | 45 | } // Anonymous namespace |
| 46 | 46 | ||
| @@ -180,12 +180,12 @@ void EmitFPClamp16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register | |||
| 180 | 180 | ||
| 181 | void EmitFPClamp32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value, ScalarF32 min_value, | 181 | void EmitFPClamp32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value, ScalarF32 min_value, |
| 182 | ScalarF32 max_value) { | 182 | ScalarF32 max_value) { |
| 183 | Clamp(ctx, ctx.reg_alloc.Define(inst), value, min_value, max_value); | 183 | Clamp(ctx, ctx.reg_alloc.Define(inst), value, min_value, max_value, "F"); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | void EmitFPClamp64(EmitContext& ctx, IR::Inst& inst, ScalarF64 value, ScalarF64 min_value, | 186 | void EmitFPClamp64(EmitContext& ctx, IR::Inst& inst, ScalarF64 value, ScalarF64 min_value, |
| 187 | ScalarF64 max_value) { | 187 | ScalarF64 max_value) { |
| 188 | Clamp(ctx, ctx.reg_alloc.LongDefine(inst), value, min_value, max_value); | 188 | Clamp(ctx, ctx.reg_alloc.LongDefine(inst), value, min_value, max_value, "F64"); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | void EmitFPRoundEven16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) { | 191 | void EmitFPRoundEven16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) { |