summaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-07-05 14:13:14 -0400
committerGravatar FernandoS272019-07-09 17:15:45 -0400
commitf2549739d1166d9177bfff3a6af150266ba5309f (patch)
tree606e744b19db98c940b9cde236ad062afb678bb1 /src/video_core/shader/decode.cpp
parentshader_ir: limit explorastion to best known program size. (diff)
downloadyuzu-f2549739d1166d9177bfff3a6af150266ba5309f.tar.gz
yuzu-f2549739d1166d9177bfff3a6af150266ba5309f.tar.xz
yuzu-f2549739d1166d9177bfff3a6af150266ba5309f.zip
shader_ir: Add comments on missing instruction.
Also shows Nvidia's address space on comments.
Diffstat (limited to 'src/video_core/shader/decode.cpp')
-rw-r--r--src/video_core/shader/decode.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp
index b0bd6630f..29c8895c5 100644
--- a/src/video_core/shader/decode.cpp
+++ b/src/video_core/shader/decode.cpp
@@ -146,15 +146,18 @@ u32 ShaderIR::DecodeInstr(NodeBlock& bb, u32 pc) {
146 146
147 const Instruction instr = {program_code[pc]}; 147 const Instruction instr = {program_code[pc]};
148 const auto opcode = OpCode::Decode(instr); 148 const auto opcode = OpCode::Decode(instr);
149 const u32 nv_address = ConvertAddressToNvidiaSpace(pc);
149 150
150 // Decoding failure 151 // Decoding failure
151 if (!opcode) { 152 if (!opcode) {
152 UNIMPLEMENTED_MSG("Unhandled instruction: {0:x}", instr.value); 153 UNIMPLEMENTED_MSG("Unhandled instruction: {0:x}", instr.value);
154 bb.push_back(Comment(fmt::format("{:05x} Unimplemented Shader instruction (0x{:016x})",
155 nv_address, instr.value)));
153 return pc + 1; 156 return pc + 1;
154 } 157 }
155 158
156 bb.push_back( 159 bb.push_back(Comment(
157 Comment(fmt::format("{}: {} (0x{:016x})", pc, opcode->get().GetName(), instr.value))); 160 fmt::format("{:05x} {} (0x{:016x})", nv_address, opcode->get().GetName(), instr.value)));
158 161
159 using Tegra::Shader::Pred; 162 using Tegra::Shader::Pred;
160 UNIMPLEMENTED_IF_MSG(instr.pred.full_pred == Pred::NeverExecute, 163 UNIMPLEMENTED_IF_MSG(instr.pred.full_pred == Pred::NeverExecute,