diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp index adac1ad41..ff01a41f1 100644 --- a/qrenderdoc/Code/CaptureContext.cpp +++ b/qrenderdoc/Code/CaptureContext.cpp @@ -380,6 +380,9 @@ void CaptureContext::AddFakeProfileMarkers() { rdctype::array &draws = m_Drawcalls; + if(!Config().EventBrowser_AddFake) + return; + if(ContainsMarker(draws)) return; diff --git a/qrenderdoc/Code/Interface/PersistantConfig.h b/qrenderdoc/Code/Interface/PersistantConfig.h index 70ba57b4d..bdc62a6fe 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.h +++ b/qrenderdoc/Code/Interface/PersistantConfig.h @@ -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 diff --git a/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp b/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp index e155fd360..3184ee61a 100644 --- a/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/SettingsDialog.cpp @@ -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(); diff --git a/qrenderdoc/Windows/Dialogs/SettingsDialog.h b/qrenderdoc/Windows/Dialogs/SettingsDialog.h index 8c81a4346..327bc0ed9 100644 --- a/qrenderdoc/Windows/Dialogs/SettingsDialog.h +++ b/qrenderdoc/Windows/Dialogs/SettingsDialog.h @@ -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); diff --git a/qrenderdoc/Windows/Dialogs/SettingsDialog.ui b/qrenderdoc/Windows/Dialogs/SettingsDialog.ui index cd8e96ae0..35f4268fd 100644 --- a/qrenderdoc/Windows/Dialogs/SettingsDialog.ui +++ b/qrenderdoc/Windows/Dialogs/SettingsDialog.ui @@ -704,6 +704,69 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st Event Browser + + + + 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 + + + Hide marker sections with only non-draw API calls (requires file reload) + + + true + + + + + + + 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 + + + + + + + + + + In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed + + + + + + + + + + In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed + + + Hide empty marker sections (requires file reload) + + + + + + + The time unit to use when displaying the duration column in the event browser + + + + + + + Qt::Vertical + + + + 20 + 297 + + + + @@ -720,91 +783,17 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st - - - - Qt::Vertical - - - - 20 - 297 - - - - - - - - The time unit to use when displaying the duration column in the event browser - - - - - - - In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed - - - Hide empty marker sections (requires file reload) - - - - - - - In the Event Browser and Timeline Bar, marker sections that contain no API calls or drawcalls will be completely removed - - - - - - - - - - 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 - - - - - - - - - - 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 - - - Hide marker sections with only non-draw API calls (requires file reload) - - - true - - - - - - - In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color. - - - - - - - - - + + 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. - + - Colorise whole row for marker regions - + 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 - - + + 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. - - Colorise whole row for marker regions + + + + + + + + In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color. + + + + + + + + + + + In the Event Browser, add fake markers if none are found in the capture. + + + Add fake markers if none present (requires log reload) + + + true + + + + + + + In the Event Browser, add fake markers if none are found in the capture.