summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-21 21:50:14 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:22 +0200
commit704c6f353f68745168902c6c66c04bb730bd30e6 (patch)
tree71ed9654de41b5828ae2613167537d39499d2f3b /src/shader_recompiler/frontend/ir
parentshader: Add denorm flush support (diff)
downloadyuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar.gz
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar.bz2
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar.lz
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar.xz
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.tar.zst
yuzu-704c6f353f68745168902c6c66c04bb730bd30e6.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp16
-rw-r--r--src/shader_recompiler/frontend/ir/pred.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index 8f120a2f6..34c2f67fb 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -468,11 +468,11 @@ F16F32F64 IREmitter::FPFma(const F16F32F64& a, const F16F32F64& b, const F16F32F
F16F32F64 IREmitter::FPAbs(const F16F32F64& value) {
switch (value.Type()) {
- case Type::U16:
+ case Type::F16:
return Inst<F16>(Opcode::FPAbs16, value);
- case Type::U32:
+ case Type::F32:
return Inst<F32>(Opcode::FPAbs32, value);
- case Type::U64:
+ case Type::F64:
return Inst<F64>(Opcode::FPAbs64, value);
default:
ThrowInvalidType(value.Type());
@@ -481,11 +481,11 @@ F16F32F64 IREmitter::FPAbs(const F16F32F64& value) {
F16F32F64 IREmitter::FPNeg(const F16F32F64& value) {
switch (value.Type()) {
- case Type::U16:
+ case Type::F16:
return Inst<F16>(Opcode::FPNeg16, value);
- case Type::U32:
+ case Type::F32:
return Inst<F32>(Opcode::FPNeg32, value);
- case Type::U64:
+ case Type::F64:
return Inst<F64>(Opcode::FPNeg64, value);
default:
ThrowInvalidType(value.Type());
@@ -495,10 +495,10 @@ F16F32F64 IREmitter::FPNeg(const F16F32F64& value) {
F16F32F64 IREmitter::FPAbsNeg(const F16F32F64& value, bool abs, bool neg) {
F16F32F64 result{value};
if (abs) {
- result = FPAbs(value);
+ result = FPAbs(result);
}
if (neg) {
- result = FPNeg(value);
+ result = FPNeg(result);
}
return result;
}
diff --git a/src/shader_recompiler/frontend/ir/pred.h b/src/shader_recompiler/frontend/ir/pred.h
index c6f2f82bf..4e7f32423 100644
--- a/src/shader_recompiler/frontend/ir/pred.h
+++ b/src/shader_recompiler/frontend/ir/pred.h
@@ -19,8 +19,8 @@ enum class Pred : u64 {
PT,
};
-constexpr size_t NUM_USER_PREDS = 6;
-constexpr size_t NUM_PREDS = 7;
+constexpr size_t NUM_USER_PREDS = 7;
+constexpr size_t NUM_PREDS = 8;
[[nodiscard]] constexpr size_t PredIndex(Pred pred) noexcept {
return static_cast<size_t>(pred);