summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-12-06 19:10:08 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2014-12-20 18:05:53 +0100
commitfd2539121cddd6177a964770a6985f8880ca1646 (patch)
tree67d2e0e33ee435569e3a82eaa891c2154ed83d53 /src/citra_qt
parentBitField: Add an explicit Assign method. (diff)
downloadyuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar.gz
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar.bz2
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar.lz
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar.xz
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.tar.zst
yuzu-fd2539121cddd6177a964770a6985f8880ca1646.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp39
1 files changed, 32 insertions, 7 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index 7f97cf143..bdd676470 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -223,9 +223,21 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace&
void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt();
- if (COMMAND_IN_RANGE(command_id, texture0)) {
- auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(Pica::registers.texture0,
- Pica::registers.texture0_format);
+ if (COMMAND_IN_RANGE(command_id, texture0) ||
+ COMMAND_IN_RANGE(command_id, texture1) ||
+ COMMAND_IN_RANGE(command_id, texture2)) {
+
+ unsigned index;
+ if (COMMAND_IN_RANGE(command_id, texture0)) {
+ index = 0;
+ } else if (COMMAND_IN_RANGE(command_id, texture1)) {
+ index = 1;
+ } else {
+ index = 2;
+ }
+ auto config = Pica::registers.GetTextures()[index].config;
+ auto format = Pica::registers.GetTextures()[index].format;
+ auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
// TODO: Instead, emit a signal here to be caught by the main window widget.
auto main_window = static_cast<QMainWindow*>(parent());
@@ -237,10 +249,23 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
QWidget* new_info_widget;
const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt();
- if (COMMAND_IN_RANGE(command_id, texture0)) {
- u8* src = Memory::GetPointer(Pica::registers.texture0.GetPhysicalAddress());
- auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(Pica::registers.texture0,
- Pica::registers.texture0_format);
+ if (COMMAND_IN_RANGE(command_id, texture0) ||
+ COMMAND_IN_RANGE(command_id, texture1) ||
+ COMMAND_IN_RANGE(command_id, texture2)) {
+
+ unsigned index;
+ if (COMMAND_IN_RANGE(command_id, texture0)) {
+ index = 0;
+ } else if (COMMAND_IN_RANGE(command_id, texture1)) {
+ index = 1;
+ } else {
+ index = 2;
+ }
+ auto config = Pica::registers.GetTextures()[index].config;
+ auto format = Pica::registers.GetTextures()[index].format;
+
+ auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
+ u8* src = Memory::GetPointer(config.GetPhysicalAddress());
new_info_widget = new TextureInfoWidget(src, info);
} else {
new_info_widget = new QWidget;