diff options
| author | 2017-07-20 22:58:38 +0300 | |
|---|---|---|
| committer | 2017-07-20 23:12:08 +0300 | |
| commit | 8375fd2aba3d700bf8b5269820f3b7cb93c56c8c (patch) | |
| tree | 4a634d5771f9b647b9d36955ee8ec0e40faf70a1 /src | |
| parent | debugger/shader: fix inverted uniform flow control (diff) | |
| download | yuzu-8375fd2aba3d700bf8b5269820f3b7cb93c56c8c.tar.gz yuzu-8375fd2aba3d700bf8b5269820f3b7cb93c56c8c.tar.xz yuzu-8375fd2aba3d700bf8b5269820f3b7cb93c56c8c.zip | |
debugger/shader: fix address register for reverted arithmetic op
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp index f8584dce7..f6bd6bf61 100644 --- a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | |||
| @@ -183,23 +183,13 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 183 | print_input(output, src1, swizzle.negate_src1, | 183 | print_input(output, src1, swizzle.negate_src1, |
| 184 | SelectorToString(swizzle.src1_selector)); | 184 | SelectorToString(swizzle.src1_selector)); |
| 185 | AlignToColumn(kInputOperandColumnWidth); | 185 | AlignToColumn(kInputOperandColumnWidth); |
| 186 | if (src_is_inverted) { | 186 | print_input(output, src2, swizzle.negate_src2, |
| 187 | print_input(output, src2, swizzle.negate_src2, | 187 | SelectorToString(swizzle.src2_selector), true, |
| 188 | SelectorToString(swizzle.src2_selector)); | 188 | src_is_inverted ? "" : instr.mad.AddressRegisterName()); |
| 189 | } else { | ||
| 190 | print_input(output, src2, swizzle.negate_src2, | ||
| 191 | SelectorToString(swizzle.src2_selector), true, | ||
| 192 | instr.mad.AddressRegisterName()); | ||
| 193 | } | ||
| 194 | AlignToColumn(kInputOperandColumnWidth); | 189 | AlignToColumn(kInputOperandColumnWidth); |
| 195 | if (src_is_inverted) { | 190 | print_input(output, src3, swizzle.negate_src3, |
| 196 | print_input(output, src3, swizzle.negate_src3, | 191 | SelectorToString(swizzle.src3_selector), true, |
| 197 | SelectorToString(swizzle.src3_selector), true, | 192 | src_is_inverted ? instr.mad.AddressRegisterName() : ""); |
| 198 | instr.mad.AddressRegisterName()); | ||
| 199 | } else { | ||
| 200 | print_input(output, src3, swizzle.negate_src3, | ||
| 201 | SelectorToString(swizzle.src3_selector)); | ||
| 202 | } | ||
| 203 | AlignToColumn(kInputOperandColumnWidth); | 193 | AlignToColumn(kInputOperandColumnWidth); |
| 204 | break; | 194 | break; |
| 205 | } | 195 | } |
| @@ -222,16 +212,15 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 222 | SourceRegister src1 = instr.common.GetSrc1(src_is_inverted); | 212 | SourceRegister src1 = instr.common.GetSrc1(src_is_inverted); |
| 223 | print_input(output, src1, swizzle.negate_src1, | 213 | print_input(output, src1, swizzle.negate_src1, |
| 224 | swizzle.SelectorToString(false), true, | 214 | swizzle.SelectorToString(false), true, |
| 225 | instr.common.AddressRegisterName()); | 215 | src_is_inverted ? "" : instr.common.AddressRegisterName()); |
| 226 | AlignToColumn(kInputOperandColumnWidth); | 216 | AlignToColumn(kInputOperandColumnWidth); |
| 227 | } | 217 | } |
| 228 | 218 | ||
| 229 | // TODO: In some cases, the Address Register is used as an index for SRC2 | ||
| 230 | // instead of SRC1 | ||
| 231 | if (opcode_info.subtype & OpCode::Info::Src2) { | 219 | if (opcode_info.subtype & OpCode::Info::Src2) { |
| 232 | SourceRegister src2 = instr.common.GetSrc2(src_is_inverted); | 220 | SourceRegister src2 = instr.common.GetSrc2(src_is_inverted); |
| 233 | print_input(output, src2, swizzle.negate_src2, | 221 | print_input(output, src2, swizzle.negate_src2, |
| 234 | swizzle.SelectorToString(true)); | 222 | swizzle.SelectorToString(true), true, |
| 223 | src_is_inverted ? instr.common.AddressRegisterName() : ""); | ||
| 235 | AlignToColumn(kInputOperandColumnWidth); | 224 | AlignToColumn(kInputOperandColumnWidth); |
| 236 | } | 225 | } |
| 237 | break; | 226 | break; |