Port EventBrowser_AddFake option to qrenderdoc

This commit is contained in:
baldurk
2017-04-20 13:20:18 +01:00
parent 3c178e2124
commit 195ef0122a
5 changed files with 123 additions and 81 deletions
+3
View File
@@ -380,6 +380,9 @@ void CaptureContext::AddFakeProfileMarkers()
{
rdctype::array<DrawcallDescription> &draws = m_Drawcalls;
if(!Config().EventBrowser_AddFake)
return;
if(ContainsMarker(draws))
return;
@@ -85,6 +85,8 @@ DECLARE_REFLECTION_STRUCT(SPIRVDisassembler);
\
CONFIG_SETTING_VAL(public, int, TimeUnit, EventBrowser_TimeUnit, TimeUnit::Microseconds) \
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_AddFake, true) \
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_HideEmpty, false) \
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_HideAPICalls, false) \
@@ -264,6 +266,14 @@ For more information about some of these settings that are user-facing see
Defaults to microseconds.
.. data:: EventBrowser_AddFake
``True`` if fake drawcall marker regions should be added to captures that don't have any markers,
for easier browsing. The regions are identified by grouping drawcalls that write to the same
targets together.
Defaults to ``True``.
.. data:: EventBrowser_HideEmpty
``True`` if the :class:`EventBrowser` should hide marker regions that don't contain any actual
@@ -75,6 +75,7 @@ SettingsDialog::SettingsDialog(ICaptureContext &ctx, QWidget *parent)
ui->AllowGlobalHook->setChecked(m_Ctx.Config().AllowGlobalHook);
ui->EventBrowser_TimeUnit->setCurrentIndex((int)m_Ctx.Config().EventBrowser_TimeUnit);
ui->EventBrowser_AddFake->setChecked(m_Ctx.Config().EventBrowser_AddFake);
ui->EventBrowser_HideEmpty->setChecked(m_Ctx.Config().EventBrowser_HideEmpty);
ui->EventBrowser_HideAPICalls->setChecked(m_Ctx.Config().EventBrowser_HideAPICalls);
ui->EventBrowser_ApplyColors->setChecked(m_Ctx.Config().EventBrowser_ApplyColors);
@@ -290,6 +291,13 @@ void SettingsDialog::on_EventBrowser_TimeUnit_currentIndexChanged(int index)
m_Ctx.Config().Save();
}
void SettingsDialog::on_EventBrowser_AddFake_toggled(bool checked)
{
m_Ctx.Config().EventBrowser_AddFake = ui->EventBrowser_AddFake->isChecked();
m_Ctx.Config().Save();
}
void SettingsDialog::on_EventBrowser_HideEmpty_toggled(bool checked)
{
m_Ctx.Config().EventBrowser_HideEmpty = ui->EventBrowser_HideEmpty->isChecked();
@@ -75,6 +75,7 @@ private slots:
// event browser
void on_EventBrowser_TimeUnit_currentIndexChanged(int index);
void on_EventBrowser_AddFake_toggled(bool checked);
void on_EventBrowser_HideEmpty_toggled(bool checked);
void on_EventBrowser_HideAPICalls_toggled(bool checked);
void on_EventBrowser_ApplyColors_toggled(bool checked);
+101 -81
View File
@@ -704,6 +704,69 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
<string>Event Browser</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="3" column="0">
<widget class="QLabel" name="label_21">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain only non-draw API calls - e.g. only queries, or only state setting - will be completely removed</string>
</property>
<property name="text">
<string>Hide marker sections with only non-draw API calls (requires file reload)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="EventBrowser_HideAPICalls">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain only non-draw API calls - e.g. only queries, or only state setting - will be completely removed</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="EventBrowser_HideEmpty">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_20">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed</string>
</property>
<property name="text">
<string>Hide empty marker sections (requires file reload)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="EventBrowser_TimeUnit">
<property name="toolTip">
<string>The time unit to use when displaying the duration column in the event browser</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>297</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_19">
<property name="sizePolicy">
@@ -720,91 +783,17 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>297</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="EventBrowser_TimeUnit">
<property name="toolTip">
<string>The time unit to use when displaying the duration column in the event browser</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_20">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed</string>
</property>
<property name="text">
<string>Hide empty marker sections (requires file reload)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="EventBrowser_HideEmpty">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="EventBrowser_HideAPICalls">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain only non-draw API calls - e.g. only queries, or only state setting - will be completely removed</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_21">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections that contain only non-draw API calls - e.g. only queries, or only state setting - will be completely removed</string>
</property>
<property name="text">
<string>Hide marker sections with only non-draw API calls (requires file reload)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="EventBrowser_ApplyColors">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color.
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="EventBrowser_ColorEventRow">
<item row="5" column="0">
<widget class="QLabel" name="label_23">
<property name="toolTip">
<string>When coloring marker sections in the Event Browser, the whole row of a marker region will be colored, not just a bar to the left of its children.</string>
</property>
<property name="text">
<string/>
<string> - Colorise whole row for marker regions</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_22">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color.
@@ -815,13 +804,44 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_23">
<item row="5" column="1">
<widget class="QCheckBox" name="EventBrowser_ColorEventRow">
<property name="toolTip">
<string>When coloring marker sections in the Event Browser, the whole row of a marker region will be colored, not just a bar to the left of its children.</string>
</property>
<property name="text">
<string> - Colorise whole row for marker regions</string>
<string/>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="EventBrowser_ApplyColors">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color.
</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_15">
<property name="toolTip">
<string>In the Event Browser, add fake markers if none are found in the capture.</string>
</property>
<property name="text">
<string>Add fake markers if none present (requires log reload)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="EventBrowser_AddFake">
<property name="toolTip">
<string>In the Event Browser, add fake markers if none are found in the capture.</string>
</property>
</widget>
</item>