summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-10 06:33:24 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commit8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd (patch)
tree7101d69f5241ee8a4ea3c7a03bbc5aee89de3f39 /src
parentglasm: Implement storage atomic ops (diff)
downloadyuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar.gz
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar.bz2
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar.lz
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar.xz
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.tar.zst
yuzu-8eb72ff0dc3eb428c28b578ffb3912c1bd1c42dd.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp3
-rw-r--r--src/shader_recompiler/backend/glasm/reg_alloc.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index e6e065e7f..8e5d575a9 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -43,7 +43,8 @@ struct RegWrapper {
RegWrapper(EmitContext& ctx, Value value)
: reg_alloc{ctx.reg_alloc}, allocated{value.type != Type::Register} {
if (allocated) {
- reg = value.type == Type::F64 ? reg_alloc.AllocLongReg() : reg_alloc.AllocReg();
+ const bool is_long{value.type == Type::F64 || value.type == Type::U64};
+ reg = is_long ? reg_alloc.AllocLongReg() : reg_alloc.AllocReg();
} else {
reg = Register{value};
}
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h
index 200c51610..8df73ca18 100644
--- a/src/shader_recompiler/backend/glasm/reg_alloc.h
+++ b/src/shader_recompiler/backend/glasm/reg_alloc.h
@@ -289,9 +289,9 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF64> {
case Shader::Backend::GLASM::Type::F32:
break;
case Shader::Backend::GLASM::Type::U64:
- return format_to(ctx.out(), "{}", Common::BitCast<f64>(value.imm_u64));
+ return fmt::format_to(ctx.out(), "{}", Common::BitCast<f64>(value.imm_u64));
case Shader::Backend::GLASM::Type::F64:
- return format_to(ctx.out(), "{}", value.imm_f64);
+ return fmt::format_to(ctx.out(), "{}", value.imm_f64);
}
throw Shader::InvalidArgument("Invalid value type {}", value.type);
}