diff options
| author | 2014-05-18 21:18:38 +0200 | |
|---|---|---|
| committer | 2014-06-12 06:10:53 -0400 | |
| commit | f82410e6335b02603c7a6fc0fc63894b6a820a5b (patch) | |
| tree | e703a09ea87cd532ed24bea5067e5c26bcf2ac1a /src/citra_qt/debugger/graphics_cmdlists.cpp | |
| parent | Refine command list debugging functionality and its qt interface. (diff) | |
| download | yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.gz yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.xz yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.zip | |
Further refine GPU command list debugging.
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index d07645e78..195197ef5 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -53,7 +53,7 @@ int GPUCommandListModel::rowCount(const QModelIndex& parent) const | |||
| 53 | 53 | ||
| 54 | int GPUCommandListModel::columnCount(const QModelIndex& parent) const | 54 | int GPUCommandListModel::columnCount(const QModelIndex& parent) const |
| 55 | { | 55 | { |
| 56 | return 1; | 56 | return 2; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const | 59 | QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const |
| @@ -68,7 +68,7 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const | |||
| 68 | const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->index].second; | 68 | const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->index].second; |
| 69 | u32 address = command_lists[item->index].first; | 69 | u32 address = command_lists[item->index].first; |
| 70 | 70 | ||
| 71 | if (role == Qt::DisplayRole) | 71 | if (role == Qt::DisplayRole && index.column() == 0) |
| 72 | { | 72 | { |
| 73 | return QVariant(QString("0x%1 bytes at 0x%2").arg(cmdlist.size(), 0, 16).arg(address, 8, 16, QLatin1Char('0'))); | 73 | return QVariant(QString("0x%1 bytes at 0x%2").arg(cmdlist.size(), 0, 16).arg(address, 8, 16, QLatin1Char('0'))); |
| 74 | } | 74 | } |
| @@ -78,11 +78,17 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const | |||
| 78 | // index refers to a specific command | 78 | // index refers to a specific command |
| 79 | const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->parent->index].second; | 79 | const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->parent->index].second; |
| 80 | const GraphicsDebugger::PicaCommand& cmd = cmdlist[item->index]; | 80 | const GraphicsDebugger::PicaCommand& cmd = cmdlist[item->index]; |
| 81 | const Pica::CommandHeader& header = cmd.GetHeader(); | ||
| 81 | 82 | ||
| 82 | if (role == Qt::DisplayRole) { | 83 | if (role == Qt::DisplayRole) { |
| 83 | QString content; | 84 | QString content; |
| 84 | for (int j = 0; j < cmd.size(); ++j) | 85 | if (index.column() == 0) { |
| 85 | content.append(QString("%1 ").arg(cmd[j], 8, 16, QLatin1Char('0'))); | 86 | content = Pica::command_names[header.cmd_id]; |
| 87 | content.append(" "); | ||
| 88 | } else if (index.column() == 1) { | ||
| 89 | for (int j = 0; j < cmd.size(); ++j) | ||
| 90 | content.append(QString("%1 ").arg(cmd[j], 8, 16, QLatin1Char('0'))); | ||
| 91 | } | ||
| 86 | 92 | ||
| 87 | return QVariant(content); | 93 | return QVariant(content); |
| 88 | } | 94 | } |