diff options
author | Mark Janes <mark.a.janes@intel.com> | 2017-04-26 18:16:56 -0700 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-06-19 14:04:51 -0700 |
commit | 2e3abae206c0ed73ebefd80b6518c065b89c8910 (patch) | |
tree | ee68b79a46f508171ec9bb7d0be891b5f178c17d /retrace/daemon/bargraph | |
parent | 74ecc79877c13dbdf43b7f70aa77b2a594f92a8c (diff) |
Experiments: Add Disable Draw experiment
Add a tab to hold frame experiments. The first experiment is the
simplest: Disable the selected draw calls.
When an experiment is enabled, all UI for the frame needs to be
refreshed to take into account the modified frame:
- Bar graph
- Metrics table
- Render target
- Shaders (for Disable Draw, they will be unchanged)
- GPU Batch
Subsequent retrace requests for these items are out of date at the point
an experiment is enabled, in the same way that Selection outdates
several the API log and other visualizations.
ExperimentId is distributed throughout the models in the same way as
selection, and they respond to that signal to request new data. The
Retrace interface drops out of date requests based on both selection and
experiment status.
Diffstat (limited to 'retrace/daemon/bargraph')
-rw-r--r-- | retrace/daemon/bargraph/glframe_qbargraph.cpp | 3 | ||||
-rw-r--r-- | retrace/daemon/bargraph/glframe_qbargraph.hpp | 2 | ||||
-rw-r--r-- | retrace/daemon/bargraph/glframe_qselection.cpp | 11 | ||||
-rw-r--r-- | retrace/daemon/bargraph/glframe_qselection.hpp | 7 | ||||
-rw-r--r-- | retrace/daemon/bargraph/test/test_selection.hpp | 4 |
5 files changed, 21 insertions, 6 deletions
diff --git a/retrace/daemon/bargraph/glframe_qbargraph.cpp b/retrace/daemon/bargraph/glframe_qbargraph.cpp index 5a5d2920..68737870 100644 --- a/retrace/daemon/bargraph/glframe_qbargraph.cpp +++ b/retrace/daemon/bargraph/glframe_qbargraph.cpp @@ -42,6 +42,7 @@ using glretrace::BarMetrics; using glretrace::FrameRetraceModel; using glretrace::QBarGraphRenderer; using glretrace::QSelection; +using glretrace::SelectionId; QBarGraphRenderer::QBarGraphRenderer() : m_graph(true), selection(NULL), @@ -108,7 +109,7 @@ QBarGraphRenderer::onBarSelect(const std::vector<int> selection) { } void -QBarGraphRenderer::onSelect(QList<int> selection) { +QBarGraphRenderer::onSelect(SelectionId, QList<int> selection) { std::set<int> s; for (auto i : selection) s.insert(i); diff --git a/retrace/daemon/bargraph/glframe_qbargraph.hpp b/retrace/daemon/bargraph/glframe_qbargraph.hpp index a31aad00..bfa736b1 100644 --- a/retrace/daemon/bargraph/glframe_qbargraph.hpp +++ b/retrace/daemon/bargraph/glframe_qbargraph.hpp @@ -53,7 +53,7 @@ class QBarGraphRenderer : public QObject, // to ensure that we get a multisample fbo QOpenGLFramebufferObject * createFramebufferObject(const QSize & size); public slots: - void onSelect(QList<int> selection); + void onSelect(glretrace::SelectionId id, QList<int> selection); void onMetrics(QList<BarMetrics> metrics); signals: void barSelect(QList<int> selection); diff --git a/retrace/daemon/bargraph/glframe_qselection.cpp b/retrace/daemon/bargraph/glframe_qselection.cpp index 1df7bcb6..7eeb31e8 100644 --- a/retrace/daemon/bargraph/glframe_qselection.cpp +++ b/retrace/daemon/bargraph/glframe_qselection.cpp @@ -29,7 +29,8 @@ using glretrace::QSelection; -QSelection::QSelection() {} +QSelection::QSelection() : m_selection_count(0), + m_experiment_count(0) {} QSelection::~QSelection() {} @@ -39,6 +40,12 @@ QSelection::select(QList<int> selection) { if (selection == _selection) return; _selection = selection; - emit onSelect(_selection); + ++m_selection_count; + emit onSelect(m_selection_count, _selection); } +void +QSelection::experiment() { + ++m_experiment_count; + emit onExperiment(m_experiment_count); +} diff --git a/retrace/daemon/bargraph/glframe_qselection.hpp b/retrace/daemon/bargraph/glframe_qselection.hpp index 5e88e8e9..7ccde0a4 100644 --- a/retrace/daemon/bargraph/glframe_qselection.hpp +++ b/retrace/daemon/bargraph/glframe_qselection.hpp @@ -30,6 +30,7 @@ #include <QList> #include "glframe_traits.hpp" +#include "glframe_retrace_interface.hpp" namespace glretrace { @@ -41,10 +42,14 @@ class QSelection : public QObject, virtual ~QSelection(); public slots: void select(QList<int> selection); + void experiment(); signals: - void onSelect(QList<int> selection); + void onSelect(glretrace::SelectionId selection_count, QList<int> selection); + void onExperiment(glretrace::ExperimentId experiment_count); private: QList<int> _selection; + SelectionId m_selection_count; + ExperimentId m_experiment_count; }; } // namespace glretrace diff --git a/retrace/daemon/bargraph/test/test_selection.hpp b/retrace/daemon/bargraph/test/test_selection.hpp index 0b69f6e5..874013b8 100644 --- a/retrace/daemon/bargraph/test/test_selection.hpp +++ b/retrace/daemon/bargraph/test/test_selection.hpp @@ -44,9 +44,11 @@ class SelectionObserver : public QObject { } virtual ~SelectionObserver() {} QList<int> selection_state; + SelectionId selection_count; bool notified; public slots: - void onSelect(QList<int> selection) { + void onSelect(glretrace::SelectionId id, QList<int> selection) { + selection_count = id; selection_state = selection; notified = true; } |