1
0
Fork 0
forked from suyu/suyu
suyu/src/citra_qt/debugger/graphics_cmdlists.hxx
Tony Wasserka fd194d95b0 citra-qt: Add texture viewer to Pica command list.
The texture viewer is enabled when selecting a write command to one of the texture config registers.
2014-12-09 16:37:34 +01:00

59 lines
1.4 KiB
C++

// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include <QAbstractListModel>
#include <QDockWidget>
#include "video_core/gpu_debugger.h"
#include "video_core/debug_utils/debug_utils.h"
class QPushButton;
class QTreeView;
class GPUCommandListModel : public QAbstractListModel
{
Q_OBJECT
public:
enum {
CommandIdRole = Qt::UserRole,
};
GPUCommandListModel(QObject* parent);
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
public slots:
void OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace);
private:
Pica::DebugUtils::PicaTrace pica_trace;
};
class GPUCommandListWidget : public QDockWidget
{
Q_OBJECT
public:
GPUCommandListWidget(QWidget* parent = 0);
public slots:
void OnToggleTracing();
void SetCommandInfo(const QModelIndex&);
signals:
void TracingFinished(const Pica::DebugUtils::PicaTrace&);
private:
std::unique_ptr<Pica::DebugUtils::PicaTrace> pica_trace;
QTreeView* list_widget;
QWidget* command_info_widget;
QPushButton* toggle_tracing;
};