From 96cc08b9601aba0a26fa322c823460e6619a5ca3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 17 May 2019 11:11:17 +0100 Subject: [PATCH] Rename 'show disabled' button to 'show unused' as it is clearer * Bindings that are unused aren't disabled - they may in fact be explicitly enabled - but they are unused by the pipeline which is why they're hidden. --- docs/getting_started/quick_start.rst | 2 +- docs/window/pipeline_state.rst | 4 ++-- docs/window/texture_viewer.rst | 2 +- .../PipelineState/D3D11PipelineStateViewer.cpp | 10 +++++----- .../PipelineState/D3D11PipelineStateViewer.h | 2 +- .../PipelineState/D3D11PipelineStateViewer.ui | 8 ++++---- .../PipelineState/D3D12PipelineStateViewer.cpp | 10 +++++----- .../PipelineState/D3D12PipelineStateViewer.h | 2 +- .../PipelineState/D3D12PipelineStateViewer.ui | 8 ++++---- .../PipelineState/GLPipelineStateViewer.cpp | 12 ++++++------ .../PipelineState/GLPipelineStateViewer.h | 2 +- .../PipelineState/GLPipelineStateViewer.ui | 8 ++++---- .../PipelineState/VulkanPipelineStateViewer.cpp | 12 ++++++------ .../PipelineState/VulkanPipelineStateViewer.h | 2 +- .../PipelineState/VulkanPipelineStateViewer.ui | 8 ++++---- qrenderdoc/Windows/TextureViewer.cpp | 16 ++++++++-------- qrenderdoc/Windows/TextureViewer.h | 4 ++-- 17 files changed, 56 insertions(+), 56 deletions(-) diff --git a/docs/getting_started/quick_start.rst b/docs/getting_started/quick_start.rst index aa8f8d091..ce456e682 100644 --- a/docs/getting_started/quick_start.rst +++ b/docs/getting_started/quick_start.rst @@ -159,7 +159,7 @@ The Pipeline State window is perhaps the most detailed but also the simplest to .. |go_arrow| image:: ../imgs/icons/action_hover.png -By default the pipeline will not contain empty or unused entries - i.e. if a shader only reads from resources 0 and 1, even if something is bound to slot 2 it will not be displayed. Likewise say slots 3-128 are empty - they will also not be displayed. This behaviour can be modified by the :guilabel:`Show Disabled Items` and :guilabel:`Show Empty Items` toggles on the toolbar. Show Disabled will show slot 2 even if the shader does not read from it. Show Empty will show slots 3-128. This behaviour varies significantly by API since the shader binding model is often quite different. +By default the pipeline will not contain empty or unused entries - i.e. if a shader only reads from resources 0 and 1, even if something is bound to slot 2 it will not be displayed. Likewise say slots 3-128 are empty - they will also not be displayed. This behaviour can be modified by the :guilabel:`Show Unused Items` and :guilabel:`Show Empty Items` toggles on the toolbar. Show Unused will show slot 2 even if the shader does not read from it. Show Empty will show slots 3-128. This behaviour varies significantly by API since the shader binding model is often quite different. One important thing to note is that most things in the sections for each pipeline stage can be expanded to view in more detail. Look for the Go Icon (|go_arrow|) to indicate that a more detailed view is available. Typically this will mean for shaders the shader source/disassembly will be opened, for texture-type resources the texture viewer will open a new tab for that resource, and for buffers it will open either the Mesh Viewer window, a raw view of that buffer, or a popup with the constant contents - depending on where the buffer is bound. diff --git a/docs/window/pipeline_state.rst b/docs/window/pipeline_state.rst index 10ec1b0b8..2695e93ca 100644 --- a/docs/window/pipeline_state.rst +++ b/docs/window/pipeline_state.rst @@ -30,9 +30,9 @@ Any resources that are bound to the pipeline can be opened in more detailed view .. |page_white_delete| image:: ../imgs/icons/page_white_delete.png .. |page_white_database| image:: ../imgs/icons/page_white_database.png -The pipeline view attempts to only show what is relevant, and not all possible stateful data. To do this (when available) it uses shader reflection data to only display slots which are actually in use by the shaders, and omit any that are unused. This can be overridden with the Show Disabled Items |page_white_delete| button. +The pipeline view attempts to only show what is relevant, and not all possible stateful data. To do this (when available) it uses shader reflection data to only display slots which are actually in use by the shaders, and omit any that are unused. This can be overridden with the Show Unused Items |page_white_delete| button. -On some APIs like Vulkan it may be common to use 'bindless' approaches where a large number of resources are bound and only a small number are accessed at any time. In these cases RenderDoc uses dynamic feedback to try to determine the set of resources accessed and only displays them. This can similarly be overridden with the Show Disabled Items |page_white_delete| button. +On some APIs like Vulkan it may be common to use 'bindless' approaches where a large number of resources are bound and only a small number are accessed at any time. In these cases RenderDoc uses dynamic feedback to try to determine the set of resources accessed and only displays them. This can similarly be overridden with the Show Unused Items |page_white_delete| button. Likewise it will omit any slots which are completely empty (and also unused), and this behaviour can be overridden with the Show Empty Items |page_white_database| button. diff --git a/docs/window/texture_viewer.rst b/docs/window/texture_viewer.rst index cecf3f223..1ffb939af 100644 --- a/docs/window/texture_viewer.rst +++ b/docs/window/texture_viewer.rst @@ -61,7 +61,7 @@ Each thumbnail has a context menu available via right click. This menu allows yo Thumbnail Menu: Thumbnail context menu with several options. -There are also two general options - show disabled and show empty. These behave the same as the options in the :doc:`pipeline_state` window - temporarily overriding the default behaviour in RenderDoc to only show texture slots that are referenced in the shader. +There are also two general options - show unused and show empty. These behave the same as the options in the :doc:`pipeline_state` window - temporarily overriding the default behaviour in RenderDoc to only show texture slots that are referenced in the shader. Pixel Context Display --------------------- diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp index 899cc9e6e..52a2df327 100644 --- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp @@ -467,7 +467,7 @@ void D3D11PipelineStateViewer::OnEventChanged(uint32_t eventId) setState(); } -void D3D11PipelineStateViewer::on_showDisabled_toggled(bool checked) +void D3D11PipelineStateViewer::on_showUnused_toggled(bool checked) { setState(); } @@ -757,15 +757,15 @@ void D3D11PipelineStateViewer::addResourceRow(const D3D11ViewTag &view, bool D3D11PipelineStateViewer::showNode(bool usedSlot, bool filledSlot) { - const bool showDisabled = ui->showDisabled->isChecked(); + const bool showUnused = ui->showUnused->isChecked(); const bool showEmpty = ui->showEmpty->isChecked(); // show if it's referenced by the shader - regardless of empty or not if(usedSlot) return true; - // it's bound, but not referenced, and we have "show disabled" - if(showDisabled && !usedSlot && filledSlot) + // it's bound, but not referenced, and we have "show unused" + if(showUnused && !usedSlot && filledSlot) return true; // it's empty, and we have "show empty" @@ -1369,7 +1369,7 @@ void D3D11PipelineStateViewer::setState() if(state.inputAssembly.indexBuffer.resourceId != ResourceId()) { - if(ibufferUsed || ui->showDisabled->isChecked()) + if(ibufferUsed || ui->showUnused->isChecked()) { uint64_t length = 0; diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h index 9bc3c49ce..f9667e6d8 100644 --- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h @@ -56,7 +56,7 @@ public: private slots: // automatic slots - void on_showDisabled_toggled(bool checked); + void on_showUnused_toggled(bool checked); void on_showEmpty_toggled(bool checked); void on_exportHTML_clicked(); void on_meshView_clicked(); diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.ui b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.ui index 19e4a140e..90e5a9599 100644 --- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.ui +++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.ui @@ -68,12 +68,12 @@ - + - Show Disabled Items + Show items that are bound but not currently used by the pipeline. - Show Disabled Items + Show Unused Items @@ -93,7 +93,7 @@ - Show Empty Items + Show pipeline bindings which are completely empty and have nothing bound Show Empty Items diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp index 89599a18f..240c16f73 100644 --- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp @@ -488,7 +488,7 @@ void D3D12PipelineStateViewer::OnEventChanged(uint32_t eventId) setState(); } -void D3D12PipelineStateViewer::on_showDisabled_toggled(bool checked) +void D3D12PipelineStateViewer::on_showUnused_toggled(bool checked) { setState(); } @@ -796,15 +796,15 @@ void D3D12PipelineStateViewer::addResourceRow(const D3D12ViewTag &view, bool D3D12PipelineStateViewer::showNode(bool usedSlot, bool filledSlot) { - const bool showDisabled = ui->showDisabled->isChecked(); + const bool showUnused = ui->showUnused->isChecked(); const bool showEmpty = ui->showEmpty->isChecked(); // show if it's referenced by the shader - regardless of empty or not if(usedSlot) return true; - // it's bound, but not referenced, and we have "show disabled" - if(showDisabled && !usedSlot && filledSlot) + // it's bound, but not referenced, and we have "show unused" + if(showUnused && !usedSlot && filledSlot) return true; // it's empty, and we have "show empty" @@ -1335,7 +1335,7 @@ void D3D12PipelineStateViewer::setState() if(state.inputAssembly.indexBuffer.resourceId != ResourceId()) { - if(ibufferUsed || ui->showDisabled->isChecked()) + if(ibufferUsed || ui->showUnused->isChecked()) { uint64_t length = 0; diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h index f19039613..4629b2d4c 100644 --- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h @@ -57,7 +57,7 @@ public: private slots: // automatic slots - void on_showDisabled_toggled(bool checked); + void on_showUnused_toggled(bool checked); void on_showEmpty_toggled(bool checked); void on_exportHTML_clicked(); void on_meshView_clicked(); diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.ui b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.ui index 23ef3647c..c056a4a90 100644 --- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.ui +++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.ui @@ -68,12 +68,12 @@ - + - Show Disabled Items + Show items that are bound but not currently used by the pipeline. - Show Disabled Items + Show Unused Items @@ -93,7 +93,7 @@ - Show Empty Items + Show pipeline bindings which are completely empty and have nothing bound Show Empty Items diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp index 5dc279c87..516155931 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp @@ -449,7 +449,7 @@ void GLPipelineStateViewer::OnEventChanged(uint32_t eventId) setState(); } -void GLPipelineStateViewer::on_showDisabled_toggled(bool checked) +void GLPipelineStateViewer::on_showUnused_toggled(bool checked) { setState(); } @@ -494,15 +494,15 @@ void GLPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, TextureDescri bool GLPipelineStateViewer::showNode(bool usedSlot, bool filledSlot) { - const bool showDisabled = ui->showDisabled->isChecked(); + const bool showUnused = ui->showUnused->isChecked(); const bool showEmpty = ui->showEmpty->isChecked(); // show if it's referenced by the shader - regardless of empty or not if(usedSlot) return true; - // it's bound, but not referenced, and we have "show disabled" - if(showDisabled && !usedSlot && filledSlot) + // it's bound, but not referenced, and we have "show unused" + if(showUnused && !usedSlot && filledSlot) return true; // it's empty, and we have "show empty" @@ -1216,7 +1216,7 @@ void GLPipelineStateViewer::setState() const GLPipe::State &state = *m_Ctx.CurGLPipelineState(); const DrawcallDescription *draw = m_Ctx.CurDrawcall(); - bool showDisabled = ui->showDisabled->isChecked(); + bool showUnused = ui->showUnused->isChecked(); bool showEmpty = ui->showEmpty->isChecked(); const QPixmap &tick = Pixmaps::tick(this); @@ -1327,7 +1327,7 @@ void GLPipelineStateViewer::setState() if(state.vertexInput.indexBuffer != ResourceId()) { - if(ibufferUsed || showDisabled) + if(ibufferUsed || showUnused) { uint64_t length = 1; diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.h index 7e86f8475..bb9828968 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.h @@ -56,7 +56,7 @@ public: private slots: // automatic slots - void on_showDisabled_toggled(bool checked); + void on_showUnused_toggled(bool checked); void on_showEmpty_toggled(bool checked); void on_exportHTML_clicked(); void on_meshView_clicked(); diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.ui b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.ui index 200fa85c0..19eb4683a 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.ui +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.ui @@ -68,12 +68,12 @@ - + - Show Disabled Items + Show items that are bound but not currently used by the pipeline. - Show Disabled Items + Show Unused Items @@ -93,7 +93,7 @@ - Show Empty Items + Show pipeline bindings which are completely empty and have nothing bound Show Empty Items diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp index a9566cd40..118e4d8cf 100644 --- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp @@ -419,7 +419,7 @@ void VulkanPipelineStateViewer::OnEventChanged(uint32_t eventId) setState(); } -void VulkanPipelineStateViewer::on_showDisabled_toggled(bool checked) +void VulkanPipelineStateViewer::on_showUnused_toggled(bool checked) { setState(); } @@ -561,15 +561,15 @@ void VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const bin bool VulkanPipelineStateViewer::showNode(bool usedSlot, bool filledSlot) { - const bool showDisabled = ui->showDisabled->isChecked(); + const bool showUnused = ui->showUnused->isChecked(); const bool showEmpty = ui->showEmpty->isChecked(); // show if it's referenced by the shader - regardless of empty or not if(usedSlot) return true; - // it's bound, but not referenced, and we have "show disabled" - if(showDisabled && !usedSlot && filledSlot) + // it's bound, but not referenced, and we have "show unused" + if(showUnused && !usedSlot && filledSlot) return true; // it's empty, and we have "show empty" @@ -1687,7 +1687,7 @@ void VulkanPipelineStateViewer::setState() const VKPipe::State &state = *m_Ctx.CurVulkanPipelineState(); const DrawcallDescription *draw = m_Ctx.CurDrawcall(); - bool showDisabled = ui->showDisabled->isChecked(); + bool showUnused = ui->showUnused->isChecked(); bool showEmpty = ui->showEmpty->isChecked(); const QPixmap &tick = Pixmaps::tick(this); @@ -1774,7 +1774,7 @@ void VulkanPipelineStateViewer::setState() if(state.inputAssembly.indexBuffer.resourceId != ResourceId()) { - if(ibufferUsed || showDisabled) + if(ibufferUsed || showUnused) { uint64_t length = 1; diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h index 3198a223a..de65728bf 100644 --- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h @@ -62,7 +62,7 @@ public: private slots: // automatic slots - void on_showDisabled_toggled(bool checked); + void on_showUnused_toggled(bool checked); void on_showEmpty_toggled(bool checked); void on_exportHTML_clicked(); void on_meshView_clicked(); diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.ui b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.ui index 7373a1ece..72ebe7b90 100644 --- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.ui +++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.ui @@ -68,12 +68,12 @@ - + - Show Disabled Items + Show items that are bound but not currently used by the pipeline. - Show Disabled Items + Show Unused Items @@ -93,7 +93,7 @@ - Show Empty Items + Show pipeline bindings which are completely empty and have nothing bound Show Empty Items diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index 5fb4fecd2..fd29e1b5a 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -1932,9 +1932,9 @@ void TextureViewer::texContextItem_triggered() } } -void TextureViewer::showDisabled_triggered() +void TextureViewer::showUnused_triggered() { - m_ShowDisabled = !m_ShowDisabled; + m_ShowUnused = !m_ShowUnused; if(m_Ctx.IsCaptureLoaded()) m_Ctx.RefreshStatus(); @@ -1972,7 +1972,7 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input, { QMenu contextMenu(this); - QAction showDisabled(tr("Show Disabled"), this); + QAction showUnused(tr("Show Unused"), this); QAction showEmpty(tr("Show Empty"), this); QAction openLockedTab(tr("Open new Locked Tab"), this); QAction openResourceInspector(tr("Open in Resource Inspector"), this); @@ -1982,13 +1982,13 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input, openLockedTab.setIcon(Icons::action_hover()); openResourceInspector.setIcon(Icons::link()); - showDisabled.setChecked(m_ShowDisabled); - showDisabled.setChecked(m_ShowEmpty); + showUnused.setChecked(m_ShowUnused); + showUnused.setChecked(m_ShowEmpty); - contextMenu.addAction(&showDisabled); + contextMenu.addAction(&showUnused); contextMenu.addAction(&showEmpty); - QObject::connect(&showDisabled, &QAction::triggered, this, &TextureViewer::showDisabled_triggered); + QObject::connect(&showUnused, &QAction::triggered, this, &TextureViewer::showUnused_triggered); QObject::connect(&showEmpty, &QAction::triggered, this, &TextureViewer::showEmpty_triggered); if(m_Ctx.CurPipelineState().SupportsBarriers()) @@ -2168,7 +2168,7 @@ void TextureViewer::InitStageResourcePreviews(ShaderStage stage, bool show = used; // it's bound, but not referenced, and we have "show disabled" - show = show || (m_ShowDisabled && !used && id != ResourceId()); + show = show || (m_ShowUnused && !used && id != ResourceId()); // it's empty, and we have "show empty" show = show || (m_ShowEmpty && id == ResourceId()); diff --git a/qrenderdoc/Windows/TextureViewer.h b/qrenderdoc/Windows/TextureViewer.h index 0a7384316..5627dc1f0 100644 --- a/qrenderdoc/Windows/TextureViewer.h +++ b/qrenderdoc/Windows/TextureViewer.h @@ -194,7 +194,7 @@ private slots: void thumb_clicked(QMouseEvent *); void thumb_doubleClicked(QMouseEvent *); void texContextItem_triggered(); - void showDisabled_triggered(); + void showUnused_triggered(); void showEmpty_triggered(); void zoomOption_returnPressed(); @@ -305,7 +305,7 @@ private: int m_PrevHighestMip = -1; bool m_ShowEmpty = false; - bool m_ShowDisabled = false; + bool m_ShowUnused = false; bool m_Visualise = false; bool m_NoRangePaint = false;