diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2021-03-21 09:32:16 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:24 +0200 |
commit | a62f04efab4331eeabd4441962f86a5e87db3f2d (patch) | |
tree | 679974e509fac5a738a3661a44f0a475d22a5a71 /src/shader_recompiler/frontend/ir | |
parent | shader: Add missing fp64 usage flags (diff) | |
download | yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar.gz yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar.bz2 yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar.lz yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar.xz yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.tar.zst yuzu-a62f04efab4331eeabd4441962f86a5e87db3f2d.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 12 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 1eda95071..00c909f3e 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp @@ -1361,7 +1361,7 @@ U32U64 IREmitter::UConvert(size_t result_bitsize, const U32U64& value) { throw NotImplementedException("Conversion from {} to {} bits", value.Type(), result_bitsize); } -F16F32F64 IREmitter::FPConvert(size_t result_bitsize, const F16F32F64& value) { +F16F32F64 IREmitter::FPConvert(size_t result_bitsize, const F16F32F64& value, FpControl control) { switch (result_bitsize) { case 16: switch (value.Type()) { @@ -1369,7 +1369,7 @@ F16F32F64 IREmitter::FPConvert(size_t result_bitsize, const F16F32F64& value) { // Nothing to do return value; case Type::F32: - return Inst<F16>(Opcode::ConvertF16F32, value); + return Inst<F16>(Opcode::ConvertF16F32, Flags{control}, value); case Type::F64: throw LogicError("Illegal conversion from F64 to F16"); default: @@ -1379,12 +1379,12 @@ F16F32F64 IREmitter::FPConvert(size_t result_bitsize, const F16F32F64& value) { case 32: switch (value.Type()) { case Type::F16: - return Inst<F32>(Opcode::ConvertF32F16, value); + return Inst<F32>(Opcode::ConvertF32F16, Flags{control}, value); case Type::F32: // Nothing to do return value; case Type::F64: - return Inst<F64>(Opcode::ConvertF32F64, value); + return Inst<F32>(Opcode::ConvertF32F64, Flags{control}, value); default: break; } @@ -1394,10 +1394,10 @@ F16F32F64 IREmitter::FPConvert(size_t result_bitsize, const F16F32F64& value) { case Type::F16: throw LogicError("Illegal conversion from F16 to F64"); case Type::F32: + return Inst<F64>(Opcode::ConvertF64F32, Flags{control}, value); + case Type::F64: // Nothing to do return value; - case Type::F64: - return Inst<F64>(Opcode::ConvertF32F64, value); default: break; } diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index ab4537d88..346cef3ab 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h @@ -216,7 +216,8 @@ public: const Value& value); [[nodiscard]] U32U64 UConvert(size_t result_bitsize, const U32U64& value); - [[nodiscard]] F16F32F64 FPConvert(size_t result_bitsize, const F16F32F64& value); + [[nodiscard]] F16F32F64 FPConvert(size_t result_bitsize, const F16F32F64& value, + FpControl control = {}); [[nodiscard]] Value ImageSampleImplicitLod(const Value& handle, const Value& coords, const F32& bias, const Value& offset, |