diff options
| author | 2018-01-11 19:21:20 -0700 | |
|---|---|---|
| committer | 2018-01-12 19:11:03 -0700 | |
| commit | ebf9a784a9f7f4148a669dbb39e7cd50df779a14 (patch) | |
| tree | d585685a1c0a34b903af1d086d62560bf56bb29f /src/citra_qt/debugger/graphics/graphics.cpp | |
| parent | config: Default CPU core to Unicorn. (diff) | |
| download | yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.gz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.xz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.zip | |
Massive removal of unused modules
Diffstat (limited to 'src/citra_qt/debugger/graphics/graphics.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics.cpp b/src/citra_qt/debugger/graphics/graphics.cpp deleted file mode 100644 index 8154363a2..000000000 --- a/src/citra_qt/debugger/graphics/graphics.cpp +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <QListView> | ||
| 6 | #include "citra_qt/debugger/graphics/graphics.h" | ||
| 7 | #include "citra_qt/util/util.h" | ||
| 8 | |||
| 9 | GraphicsDebugger g_debugger; | ||
| 10 | |||
| 11 | GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent) | ||
| 12 | : QAbstractListModel(parent), command_count(0) { | ||
| 13 | connect(this, SIGNAL(GXCommandFinished(int)), this, SLOT(OnGXCommandFinishedInternal(int))); | ||
| 14 | } | ||
| 15 | |||
| 16 | int GPUCommandStreamItemModel::rowCount(const QModelIndex& parent) const { | ||
| 17 | return command_count; | ||
| 18 | } | ||
| 19 | |||
| 20 | QVariant GPUCommandStreamItemModel::data(const QModelIndex& index, int role) const { | ||
| 21 | if (!index.isValid()) | ||
| 22 | return QVariant(); | ||
| 23 | |||
| 24 | int command_index = index.row(); | ||
| 25 | const Service::GSP::Command& command = GetDebugger()->ReadGXCommandHistory(command_index); | ||
| 26 | if (role == Qt::DisplayRole) { | ||
| 27 | std::map<Service::GSP::CommandId, const char*> command_names = { | ||
| 28 | {Service::GSP::CommandId::REQUEST_DMA, "REQUEST_DMA"}, | ||
| 29 | {Service::GSP::CommandId::SUBMIT_GPU_CMDLIST, "SUBMIT_GPU_CMDLIST"}, | ||
| 30 | {Service::GSP::CommandId::SET_MEMORY_FILL, "SET_MEMORY_FILL"}, | ||
| 31 | {Service::GSP::CommandId::SET_DISPLAY_TRANSFER, "SET_DISPLAY_TRANSFER"}, | ||
| 32 | {Service::GSP::CommandId::SET_TEXTURE_COPY, "SET_TEXTURE_COPY"}, | ||
| 33 | {Service::GSP::CommandId::CACHE_FLUSH, "CACHE_FLUSH"}, | ||
| 34 | }; | ||
| 35 | const u32* command_data = reinterpret_cast<const u32*>(&command); | ||
| 36 | QString str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9") | ||
| 37 | .arg(command_names[command.id]) | ||
| 38 | .arg(command_data[0], 8, 16, QLatin1Char('0')) | ||
| 39 | .arg(command_data[1], 8, 16, QLatin1Char('0')) | ||
| 40 | .arg(command_data[2], 8, 16, QLatin1Char('0')) | ||
| 41 | .arg(command_data[3], 8, 16, QLatin1Char('0')) | ||
| 42 | .arg(command_data[4], 8, 16, QLatin1Char('0')) | ||
| 43 | .arg(command_data[5], 8, 16, QLatin1Char('0')) | ||
| 44 | .arg(command_data[6], 8, 16, QLatin1Char('0')) | ||
| 45 | .arg(command_data[7], 8, 16, QLatin1Char('0')); | ||
| 46 | return QVariant(str); | ||
| 47 | } else { | ||
| 48 | return QVariant(); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | void GPUCommandStreamItemModel::GXCommandProcessed(int total_command_count) { | ||
| 53 | emit GXCommandFinished(total_command_count); | ||
| 54 | } | ||
| 55 | |||
| 56 | void GPUCommandStreamItemModel::OnGXCommandFinishedInternal(int total_command_count) { | ||
| 57 | if (total_command_count == 0) | ||
| 58 | return; | ||
| 59 | |||
| 60 | int prev_command_count = command_count; | ||
| 61 | command_count = total_command_count; | ||
| 62 | emit dataChanged(index(prev_command_count, 0), index(total_command_count - 1, 0)); | ||
| 63 | } | ||
| 64 | |||
| 65 | GPUCommandStreamWidget::GPUCommandStreamWidget(QWidget* parent) | ||
| 66 | : QDockWidget(tr("Graphics Debugger"), parent) { | ||
| 67 | setObjectName("GraphicsDebugger"); | ||
| 68 | |||
| 69 | GPUCommandStreamItemModel* command_model = new GPUCommandStreamItemModel(this); | ||
| 70 | g_debugger.RegisterObserver(command_model); | ||
| 71 | |||
| 72 | QListView* command_list = new QListView; | ||
| 73 | command_list->setModel(command_model); | ||
| 74 | command_list->setFont(GetMonospaceFont()); | ||
| 75 | |||
| 76 | setWidget(command_list); | ||
| 77 | } | ||