diff options
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.h')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.h b/src/citra_qt/debugger/graphics_cmdlists.h new file mode 100644 index 000000000..a465d044c --- /dev/null +++ b/src/citra_qt/debugger/graphics_cmdlists.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <QAbstractListModel> | ||
| 8 | #include <QDockWidget> | ||
| 9 | |||
| 10 | #include "video_core/gpu_debugger.h" | ||
| 11 | #include "video_core/debug_utils/debug_utils.h" | ||
| 12 | |||
| 13 | class QPushButton; | ||
| 14 | class QTreeView; | ||
| 15 | |||
| 16 | class GPUCommandListModel : public QAbstractListModel | ||
| 17 | { | ||
| 18 | Q_OBJECT | ||
| 19 | |||
| 20 | public: | ||
| 21 | enum { | ||
| 22 | CommandIdRole = Qt::UserRole, | ||
| 23 | }; | ||
| 24 | |||
| 25 | GPUCommandListModel(QObject* parent); | ||
| 26 | |||
| 27 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 28 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 29 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
| 30 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | ||
| 31 | |||
| 32 | public slots: | ||
| 33 | void OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace); | ||
| 34 | |||
| 35 | private: | ||
| 36 | Pica::DebugUtils::PicaTrace pica_trace; | ||
| 37 | }; | ||
| 38 | |||
| 39 | class GPUCommandListWidget : public QDockWidget | ||
| 40 | { | ||
| 41 | Q_OBJECT | ||
| 42 | |||
| 43 | public: | ||
| 44 | GPUCommandListWidget(QWidget* parent = 0); | ||
| 45 | |||
| 46 | public slots: | ||
| 47 | void OnToggleTracing(); | ||
| 48 | void OnCommandDoubleClicked(const QModelIndex&); | ||
| 49 | |||
| 50 | void SetCommandInfo(const QModelIndex&); | ||
| 51 | |||
| 52 | signals: | ||
| 53 | void TracingFinished(const Pica::DebugUtils::PicaTrace&); | ||
| 54 | |||
| 55 | private: | ||
| 56 | std::unique_ptr<Pica::DebugUtils::PicaTrace> pica_trace; | ||
| 57 | |||
| 58 | QTreeView* list_widget; | ||
| 59 | QWidget* command_info_widget; | ||
| 60 | QPushButton* toggle_tracing; | ||
| 61 | }; | ||
| 62 | |||
| 63 | class TextureInfoDockWidget : public QDockWidget { | ||
| 64 | Q_OBJECT | ||
| 65 | |||
| 66 | public: | ||
| 67 | TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr); | ||
| 68 | |||
| 69 | signals: | ||
| 70 | void UpdatePixmap(const QPixmap& pixmap); | ||
| 71 | |||
| 72 | private slots: | ||
| 73 | void OnAddressChanged(qint64 value); | ||
| 74 | void OnFormatChanged(int value); | ||
| 75 | void OnWidthChanged(int value); | ||
| 76 | void OnHeightChanged(int value); | ||
| 77 | void OnStrideChanged(int value); | ||
| 78 | |||
| 79 | private: | ||
| 80 | QPixmap ReloadPixmap() const; | ||
| 81 | |||
| 82 | Pica::DebugUtils::TextureInfo info; | ||
| 83 | }; | ||