committed by
ameerj
18 changed files with 507 additions and 119 deletions
-
1src/shader_recompiler/CMakeLists.txt
-
67src/shader_recompiler/backend/spirv/emit_spirv.h
-
192src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
-
21src/shader_recompiler/backend/spirv/emit_spirv_select.cpp
-
144src/shader_recompiler/frontend/ir/ir_emitter.cpp
-
18src/shader_recompiler/frontend/ir/ir_emitter.h
-
50src/shader_recompiler/frontend/ir/opcodes.inc
-
3src/shader_recompiler/frontend/maxwell/translate/impl/common_encoding.h
-
2src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp
-
4src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_fused_multiply_add.cpp
-
8src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_multi_function.cpp
-
42src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_multiply.cpp
-
41src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_range_reduction.cpp
-
12src/shader_recompiler/frontend/maxwell/translate/impl/impl.cpp
-
5src/shader_recompiler/frontend/maxwell/translate/impl/impl.h
-
2src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp
-
12src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp
-
2src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@ -0,0 +1,41 @@ |
|||||
|
// Copyright 2021 yuzu Emulator Project
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include "common/bit_field.h"
|
||||
|
#include "common/common_types.h"
|
||||
|
#include "shader_recompiler/frontend/maxwell/translate/impl/impl.h"
|
||||
|
|
||||
|
namespace Shader::Maxwell { |
||||
|
namespace { |
||||
|
enum class Mode : u64 { |
||||
|
SINCOS, |
||||
|
EX2, |
||||
|
}; |
||||
|
|
||||
|
void RRO(TranslatorVisitor& v, u64 insn, const IR::F32& src) { |
||||
|
union { |
||||
|
u64 raw; |
||||
|
BitField<0, 8, IR::Reg> dest_reg; |
||||
|
BitField<39, 1, Mode> mode; |
||||
|
BitField<45, 1, u64> neg; |
||||
|
BitField<49, 1, u64> abs; |
||||
|
} const rro{insn}; |
||||
|
|
||||
|
v.F(rro.dest_reg, v.ir.FPAbsNeg(src, rro.abs != 0, rro.neg != 0)); |
||||
|
} |
||||
|
} // Anonymous namespace
|
||||
|
|
||||
|
void TranslatorVisitor::RRO_reg(u64 insn) { |
||||
|
RRO(*this, insn, GetFloatReg20(insn)); |
||||
|
} |
||||
|
|
||||
|
void TranslatorVisitor::RRO_cbuf(u64 insn) { |
||||
|
RRO(*this, insn, GetFloatCbuf(insn)); |
||||
|
} |
||||
|
|
||||
|
void TranslatorVisitor::RRO_imm(u64) { |
||||
|
throw NotImplementedException("RRO (imm)"); |
||||
|
} |
||||
|
|
||||
|
} // namespace Shader::Maxwell
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue