diff options
| author | 2015-07-25 22:00:40 +0200 | |
|---|---|---|
| committer | 2015-07-26 16:23:12 +0200 | |
| commit | e663751f8b6cc6fd469d3974b3e68e434ebee9db (patch) | |
| tree | c48b19af6f1e95671839cf4b6153c5e155b3494c /src/citra_qt/debugger/graphics_cmdlists.cpp | |
| parent | citra-qt/command list: monospace font on windows (diff) | |
| download | yuzu-e663751f8b6cc6fd469d3974b3e68e434ebee9db.tar.gz yuzu-e663751f8b6cc6fd469d3974b3e68e434ebee9db.tar.xz yuzu-e663751f8b6cc6fd469d3974b3e68e434ebee9db.zip | |
citra-qt/command list: Add mask column
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 9034b120e..0427ebc95 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -175,29 +175,29 @@ int GPUCommandListModel::rowCount(const QModelIndex& parent) const { | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | int GPUCommandListModel::columnCount(const QModelIndex& parent) const { | 177 | int GPUCommandListModel::columnCount(const QModelIndex& parent) const { |
| 178 | return 3; | 178 | return 4; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { | 181 | QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { |
| 182 | if (!index.isValid()) | 182 | if (!index.isValid()) |
| 183 | return QVariant(); | 183 | return QVariant(); |
| 184 | 184 | ||
| 185 | const auto& writes = pica_trace.writes; | 185 | const auto& write = pica_trace.writes[index.row()]; |
| 186 | const Pica::CommandProcessor::CommandHeader cmd{writes[index.row()].Id()}; | ||
| 187 | const u32 val{writes[index.row()].Value()}; | ||
| 188 | 186 | ||
| 189 | if (role == Qt::DisplayRole) { | 187 | if (role == Qt::DisplayRole) { |
| 190 | QString content; | 188 | QString content; |
| 191 | switch ( index.column() ) { | 189 | switch ( index.column() ) { |
| 192 | case 0: | 190 | case 0: |
| 193 | return QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str()); | 191 | return QString::fromLatin1(Pica::Regs::GetCommandName(write.cmd_id).c_str()); |
| 194 | case 1: | 192 | case 1: |
| 195 | return QString("%1").arg(cmd.cmd_id, 3, 16, QLatin1Char('0')); | 193 | return QString("%1").arg(write.cmd_id, 3, 16, QLatin1Char('0')); |
| 196 | case 2: | 194 | case 2: |
| 197 | return QString("%1").arg(val, 8, 16, QLatin1Char('0')); | 195 | return QString("%1").arg(write.mask, 4, 2, QLatin1Char('0')); |
| 196 | case 3: | ||
| 197 | return QString("%1").arg(write.value, 8, 16, QLatin1Char('0')); | ||
| 198 | } | 198 | } |
| 199 | } else if (role == CommandIdRole) { | 199 | } else if (role == CommandIdRole) { |
| 200 | return QVariant::fromValue<int>(cmd.cmd_id.Value()); | 200 | return QVariant::fromValue<int>(write.cmd_id); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | return QVariant(); | 203 | return QVariant(); |
| @@ -213,6 +213,8 @@ QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientatio | |||
| 213 | case 1: | 213 | case 1: |
| 214 | return tr("Register"); | 214 | return tr("Register"); |
| 215 | case 2: | 215 | case 2: |
| 216 | return tr("Mask"); | ||
| 217 | case 3: | ||
| 216 | return tr("New Value"); | 218 | return tr("New Value"); |
| 217 | } | 219 | } |
| 218 | 220 | ||