diff options
| author | 2017-10-09 23:56:20 -0400 | |
|---|---|---|
| committer | 2017-10-09 23:56:20 -0400 | |
| commit | b1d5db1cf60344b6b081c9d03cb6ccc3264326cd (patch) | |
| tree | fde377c4ba3c0f92c032e6f5ec8627aae37270ef /src/citra_qt/debugger | |
| parent | loader: Various improvements for NSO/NRO loaders. (diff) | |
| parent | Merge pull request #2996 from MerryMage/split-travis (diff) | |
| download | yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.gz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.xz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.zip | |
Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
Diffstat (limited to 'src/citra_qt/debugger')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_cmdlists.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_surface.cpp | 3 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | 41 |
3 files changed, 22 insertions, 26 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp index 7d06ec28a..ce2b9fa50 100644 --- a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp | |||
| @@ -26,8 +26,8 @@ | |||
| 26 | namespace { | 26 | namespace { |
| 27 | QImage LoadTexture(const u8* src, const Pica::Texture::TextureInfo& info) { | 27 | QImage LoadTexture(const u8* src, const Pica::Texture::TextureInfo& info) { |
| 28 | QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); | 28 | QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); |
| 29 | for (int y = 0; y < info.height; ++y) { | 29 | for (u32 y = 0; y < info.height; ++y) { |
| 30 | for (int x = 0; x < info.width; ++x) { | 30 | for (u32 x = 0; x < info.width; ++x) { |
| 31 | Math::Vec4<u8> color = Pica::Texture::LookupTexture(src, x, y, info, true); | 31 | Math::Vec4<u8> color = Pica::Texture::LookupTexture(src, x, y, info, true); |
| 32 | decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); | 32 | decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); |
| 33 | } | 33 | } |
diff --git a/src/citra_qt/debugger/graphics/graphics_surface.cpp b/src/citra_qt/debugger/graphics/graphics_surface.cpp index 47d9924e1..c974545ef 100644 --- a/src/citra_qt/debugger/graphics/graphics_surface.cpp +++ b/src/citra_qt/debugger/graphics/graphics_surface.cpp | |||
| @@ -273,7 +273,8 @@ void GraphicsSurfaceWidget::Pick(int x, int y) { | |||
| 273 | surface_picker_x_control->setValue(x); | 273 | surface_picker_x_control->setValue(x); |
| 274 | surface_picker_y_control->setValue(y); | 274 | surface_picker_y_control->setValue(y); |
| 275 | 275 | ||
| 276 | if (x < 0 || x >= surface_width || y < 0 || y >= surface_height) { | 276 | if (x < 0 || x >= static_cast<int>(surface_width) || y < 0 || |
| 277 | y >= static_cast<int>(surface_height)) { | ||
| 277 | surface_info_label->setText(tr("Pixel out of bounds")); | 278 | surface_info_label->setText(tr("Pixel out of bounds")); |
| 278 | surface_info_label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); | 279 | surface_info_label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); |
| 279 | return; | 280 | return; |
diff --git a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp index e3f3194db..7f4ec0c52 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; |
| @@ -247,7 +236,9 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 247 | 236 | ||
| 248 | switch (opcode.EffectiveOpCode()) { | 237 | switch (opcode.EffectiveOpCode()) { |
| 249 | case OpCode::Id::LOOP: | 238 | case OpCode::Id::LOOP: |
| 250 | output << "(unknown instruction format)"; | 239 | output << 'i' << instr.flow_control.int_uniform_id << " (end on 0x" |
| 240 | << std::setw(4) << std::right << std::setfill('0') << std::hex | ||
| 241 | << (4 * instr.flow_control.dest_offset) << ")"; | ||
| 251 | break; | 242 | break; |
| 252 | 243 | ||
| 253 | default: | 244 | default: |
| @@ -255,7 +246,7 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 255 | output << '('; | 246 | output << '('; |
| 256 | 247 | ||
| 257 | if (instr.flow_control.op != instr.flow_control.JustY) { | 248 | if (instr.flow_control.op != instr.flow_control.JustY) { |
| 258 | if (instr.flow_control.refx) | 249 | if (!instr.flow_control.refx) |
| 259 | output << '!'; | 250 | output << '!'; |
| 260 | output << "cc.x"; | 251 | output << "cc.x"; |
| 261 | } | 252 | } |
| @@ -267,13 +258,17 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 267 | } | 258 | } |
| 268 | 259 | ||
| 269 | if (instr.flow_control.op != instr.flow_control.JustX) { | 260 | if (instr.flow_control.op != instr.flow_control.JustX) { |
| 270 | if (instr.flow_control.refy) | 261 | if (!instr.flow_control.refy) |
| 271 | output << '!'; | 262 | output << '!'; |
| 272 | output << "cc.y"; | 263 | output << "cc.y"; |
| 273 | } | 264 | } |
| 274 | 265 | ||
| 275 | output << ") "; | 266 | output << ") "; |
| 276 | } else if (opcode_info.subtype & OpCode::Info::HasUniformIndex) { | 267 | } else if (opcode_info.subtype & OpCode::Info::HasUniformIndex) { |
| 268 | if (opcode.EffectiveOpCode() == OpCode::Id::JMPU && | ||
| 269 | (instr.flow_control.num_instructions & 1) == 1) { | ||
| 270 | output << '!'; | ||
| 271 | } | ||
| 277 | output << 'b' << instr.flow_control.bool_uniform_id << ' '; | 272 | output << 'b' << instr.flow_control.bool_uniform_id << ' '; |
| 278 | } | 273 | } |
| 279 | 274 | ||