aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra_qt/debugger/graphics_vertex_shader.h
blob: 38339dc059ce360b8e370a429d957d17c4b93ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <QAbstractListModel>

#include "graphics_breakpoint_observer.h"

#include "nihstro/parser_shbin.h"

class GraphicsVertexShaderModel : public QAbstractItemModel {
    Q_OBJECT

public:
    GraphicsVertexShaderModel(QObject* parent);

    QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
    QModelIndex parent(const QModelIndex& child) const override;
    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 OnUpdate();

private:
    nihstro::ShaderInfo info;
};

class GraphicsVertexShaderWidget : public BreakPointObserverDock {
    Q_OBJECT

    using Event = Pica::DebugContext::Event;

public:
    GraphicsVertexShaderWidget(std::shared_ptr<Pica::DebugContext> debug_context,
                               QWidget* parent = nullptr);

private slots:
    void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override;
    void OnResumed() override;

signals:
    void Update();

private:

};