diff options
author | bunnei <bunneidev@gmail.com> | 2019-02-07 03:56:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-07 03:56:14 +0100 |
commit | f09d1dffd16ab857d6cf75b862aa0b01777e5673 (patch) | |
tree | 8d99905781788745e7a058cdb844964bbc15eba4 /src/video_core/shader/decode/memory.cpp | |
parent | Merge pull request #2091 from FearlessTobi/port-4603 (diff) | |
parent | shader/track: Search inside of conditional nodes (diff) | |
download | yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar.gz yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar.bz2 yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar.lz yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar.xz yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.tar.zst yuzu-f09d1dffd16ab857d6cf75b862aa0b01777e5673.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode/memory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/decode/memory.cpp b/src/video_core/shader/decode/memory.cpp index 3dd26da20..e006f8138 100644 --- a/src/video_core/shader/decode/memory.cpp +++ b/src/video_core/shader/decode/memory.cpp @@ -36,7 +36,7 @@ static std::size_t GetCoordCount(TextureType texture_type) { } } -u32 ShaderIR::DecodeMemory(BasicBlock& bb, const BasicBlock& code, u32 pc) { +u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { const Instruction instr = {program_code[pc]}; const auto opcode = OpCode::Decode(instr); @@ -160,7 +160,8 @@ u32 ShaderIR::DecodeMemory(BasicBlock& bb, const BasicBlock& code, u32 pc) { }(); const Node addr_register = GetRegister(instr.gpr8); - const Node base_address = TrackCbuf(addr_register, code, static_cast<s64>(code.size())); + const Node base_address = + TrackCbuf(addr_register, global_code, static_cast<s64>(global_code.size())); const auto cbuf = std::get_if<CbufNode>(base_address); ASSERT(cbuf != nullptr); const auto cbuf_offset_imm = std::get_if<ImmediateNode>(cbuf->GetOffset()); @@ -464,8 +465,7 @@ const Sampler& ShaderIR::GetSampler(const Tegra::Shader::Sampler& sampler, Textu return *used_samplers.emplace(entry).first; } -void ShaderIR::WriteTexInstructionFloat(BasicBlock& bb, Instruction instr, - const Node4& components) { +void ShaderIR::WriteTexInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components) { u32 dest_elem = 0; for (u32 elem = 0; elem < 4; ++elem) { if (!instr.tex.IsComponentEnabled(elem)) { @@ -480,7 +480,7 @@ void ShaderIR::WriteTexInstructionFloat(BasicBlock& bb, Instruction instr, } } -void ShaderIR::WriteTexsInstructionFloat(BasicBlock& bb, Instruction instr, +void ShaderIR::WriteTexsInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components) { // TEXS has two destination registers and a swizzle. The first two elements in the swizzle // go into gpr0+0 and gpr0+1, and the rest goes into gpr28+0 and gpr28+1 @@ -504,7 +504,7 @@ void ShaderIR::WriteTexsInstructionFloat(BasicBlock& bb, Instruction instr, } } -void ShaderIR::WriteTexsInstructionHalfFloat(BasicBlock& bb, Instruction instr, +void ShaderIR::WriteTexsInstructionHalfFloat(NodeBlock& bb, Instruction instr, const Node4& components) { // TEXS.F16 destionation registers are packed in two registers in pairs (just like any half // float instruction). |