summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-11 00:20:15 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commit70fbede213bfadfc4015b3227e57fca34bea46eb (patch)
tree72a860110d4228ba5a9bc6ca977b0fed55385d77 /src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
parentglasm: Implement shuffle and vote instructions on GLASM (diff)
downloadyuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar.gz
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar.bz2
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar.lz
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar.xz
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.tar.zst
yuzu-70fbede213bfadfc4015b3227e57fca34bea46eb.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp8
1 files changed, 4 insertions, 4 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 15db6618f..d2c324ad6 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
@@ -38,9 +38,9 @@ template <typename InputType>
void Clamp(EmitContext& ctx, Register ret, InputType value, InputType min_value,
InputType max_value, std::string_view type) {
// Call MAX first to properly clamp nan to min_value instead
- ctx.Add("MAX.{} {}.x,{},{};"
- "MIN.{} {}.x,{}.x,{};",
- type, ret, min_value, value, type, ret, ret, max_value);
+ ctx.Add("MAX.{} RC.x,{},{};"
+ "MIN.{} {}.x,RC.x,{};",
+ type, min_value, value, type, ret, max_value);
}
} // Anonymous namespace
@@ -159,7 +159,7 @@ void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Regis
void EmitFPSqrt(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
const Register ret{ctx.reg_alloc.Define(inst)};
- ctx.Add("RSQ {}.x,{};RCP {}.x,{}.x;", ret, value, ret, ret);
+ ctx.Add("RSQ RC.x,{};RCP {}.x,RC.x;", value, ret);
}
void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {