MCPcopy Create free account
hub / github.com/baldurk/renderdoc / ShaderMessageViewer

Method ShaderMessageViewer

qrenderdoc/Windows/ShaderMessageViewer.cpp:40–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38static const int gotoableRole = Qt::UserRole + 2;
39
40ShaderMessageViewer::ShaderMessageViewer(ICaptureContext &ctx, ShaderStageMask stages, QWidget *parent)
41 : QFrame(parent), ui(new Ui::ShaderMessageViewer), m_Ctx(ctx)
42{
43 ui->setupUi(this);
44
45 ui->messages->setFont(Formatter::PreferredFont());
46
47 ui->messages->setMouseTracking(true);
48
49 m_API = m_Ctx.APIProps().pipelineType;
50
51 QObject::connect(ui->task, &QToolButton::toggled, [this](bool) { refreshMessages(); });
52 QObject::connect(ui->mesh, &QToolButton::toggled, [this](bool) { refreshMessages(); });
53 QObject::connect(ui->vertex, &QToolButton::toggled, [this](bool) { refreshMessages(); });
54 QObject::connect(ui->hull, &QToolButton::toggled, [this](bool) { refreshMessages(); });
55 QObject::connect(ui->domain, &QToolButton::toggled, [this](bool) { refreshMessages(); });
56 QObject::connect(ui->geometry, &QToolButton::toggled, [this](bool) { refreshMessages(); });
57 QObject::connect(ui->pixel, &QToolButton::toggled, [this](bool) { refreshMessages(); });
58 QObject::connect(ui->filterButton, &QToolButton::clicked, [this]() { refreshMessages(); });
59 QObject::connect(ui->filter, &RDLineEdit::returnPressed, [this]() { refreshMessages(); });
60
61 QMenu *menu = new QMenu(this);
62
63 QAction *action = new QAction(tr("Export to &Text"));
64 action->setIcon(Icons::save());
65 QObject::connect(action, &QAction::triggered, this, &ShaderMessageViewer::exportText);
66 menu->addAction(action);
67
68 action = new QAction(tr("Export to &CSV"));
69 action->setIcon(Icons::save());
70 QObject::connect(action, &QAction::triggered, this, &ShaderMessageViewer::exportCSV);
71 menu->addAction(action);
72
73 ui->exportButton->setMenu(menu);
74 QObject::connect(ui->exportButton, &QToolButton::clicked, this, &ShaderMessageViewer::exportText);
75
76 ui->task->setText(ToQStr(ShaderStage::Task, m_API));
77 ui->mesh->setText(ToQStr(ShaderStage::Mesh, m_API));
78 ui->vertex->setText(ToQStr(ShaderStage::Vertex, m_API));
79 ui->hull->setText(ToQStr(ShaderStage::Hull, m_API));
80 ui->domain->setText(ToQStr(ShaderStage::Domain, m_API));
81 ui->geometry->setText(ToQStr(ShaderStage::Geometry, m_API));
82 ui->pixel->setText(ToQStr(ShaderStage::Pixel, m_API));
83
84 m_EID = m_Ctx.CurEvent();
85 m_Action = m_Ctx.GetAction(m_EID);
86
87 const PipeState &pipe = m_Ctx.CurPipelineState();
88
89 // check if we have multiview enabled
90 m_Multiview = pipe.MultiviewBroadcastCount() > 1;
91
92 // only display sample information if one of the targets is multisampled
93 m_Multisampled = false;
94 rdcarray<Descriptor> outs = pipe.GetOutputTargets();
95 outs.push_back(pipe.GetDepthTarget());
96 outs.push_back(pipe.GetDepthResolveTarget());
97 for(const Descriptor &o : outs)

Callers

nothing calls this directly

Calls 15

connectFunction · 0.85
MaskForStageFunction · 0.85
ShowProgressDialogFunction · 0.85
criticalFunction · 0.85
RENDERDOC_VertexOffsetFunction · 0.85
rdcstrClass · 0.85
setMouseTrackingMethod · 0.80
GetOutputTargetsMethod · 0.80
GetDepthTargetMethod · 0.80
GetDepthResolveTargetMethod · 0.80
setEnableTriggerMethod · 0.80
indexAtMethod · 0.80

Tested by

no test coverage detected