diff options
| author | 2015-08-19 04:52:44 -0300 | |
|---|---|---|
| committer | 2015-09-07 16:46:27 -0300 | |
| commit | 8540e021768c8c148334b757cffdfc6db73ba54e (patch) | |
| tree | 47d05c46d0cc17c32373dbc1ccfce3bc814d22ec /src | |
| parent | Shader Disassembly: Fix disassembly of IFU/CALLU instructions (diff) | |
| download | yuzu-8540e021768c8c148334b757cffdfc6db73ba54e.tar.gz yuzu-8540e021768c8c148334b757cffdfc6db73ba54e.tar.xz yuzu-8540e021768c8c148334b757cffdfc6db73ba54e.zip | |
Shader Disassembly: Fix printing of jump offsets
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index 131b13952..59b63cd54 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp | |||
| @@ -104,7 +104,7 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 104 | case 2: | 104 | case 2: |
| 105 | { | 105 | { |
| 106 | std::ostringstream output; | 106 | std::ostringstream output; |
| 107 | output.flags(std::ios::hex | std::ios::uppercase); | 107 | output.flags(std::ios::uppercase); |
| 108 | 108 | ||
| 109 | // To make the code aligning columns of assembly easier to keep track of, this function | 109 | // To make the code aligning columns of assembly easier to keep track of, this function |
| 110 | // keeps track of the start of the start of the previous column, allowing alignment | 110 | // keeps track of the start of the start of the previous column, allowing alignment |
| @@ -264,16 +264,16 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 264 | u32 target_addr_else = instr.flow_control.dest_offset; | 264 | u32 target_addr_else = instr.flow_control.dest_offset; |
| 265 | 265 | ||
| 266 | if (opcode_info.subtype & OpCode::Info::HasAlternative) { | 266 | if (opcode_info.subtype & OpCode::Info::HasAlternative) { |
| 267 | output << "else jump to 0x" << std::setw(4) << std::right << std::setfill('0') << (4 * instr.flow_control.dest_offset); | 267 | output << "else jump to 0x" << std::setw(4) << std::right << std::setfill('0') << std::hex << (4 * instr.flow_control.dest_offset); |
| 268 | } else if (opcode_info.subtype & OpCode::Info::HasExplicitDest) { | 268 | } else if (opcode_info.subtype & OpCode::Info::HasExplicitDest) { |
| 269 | output << "jump to 0x" << std::setw(4) << std::right << std::setfill('0') << (4 * instr.flow_control.dest_offset); | 269 | output << "jump to 0x" << std::setw(4) << std::right << std::setfill('0') << std::hex << (4 * instr.flow_control.dest_offset); |
| 270 | } else { | 270 | } else { |
| 271 | // TODO: Handle other cases | 271 | // TODO: Handle other cases |
| 272 | output << "(unknown destination)"; | 272 | output << "(unknown destination)"; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | if (opcode_info.subtype & OpCode::Info::HasFinishPoint) { | 275 | if (opcode_info.subtype & OpCode::Info::HasFinishPoint) { |
| 276 | output << " (return on " << std::setw(4) << std::right << std::setfill('0') | 276 | output << " (return on 0x" << std::setw(4) << std::right << std::setfill('0') << std::hex |
| 277 | << (4 * instr.flow_control.dest_offset + 4 * instr.flow_control.num_instructions) << ')'; | 277 | << (4 * instr.flow_control.dest_offset + 4 * instr.flow_control.num_instructions) << ')'; |
| 278 | } | 278 | } |
| 279 | 279 | ||