diff --git a/docs/imgs/Screenshots/OpenLockedTab.png b/docs/imgs/Screenshots/OpenLockedTab.png index 0bd8229da..7deb17fa5 100644 Binary files a/docs/imgs/Screenshots/OpenLockedTab.png and b/docs/imgs/Screenshots/OpenLockedTab.png differ diff --git a/docs/window/texture_viewer.rst b/docs/window/texture_viewer.rst index 0c3ae9bcf..e0cc120a5 100644 --- a/docs/window/texture_viewer.rst +++ b/docs/window/texture_viewer.rst @@ -61,8 +61,6 @@ 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 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/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index ca9b1d5bb..e62fcf91b 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -89,6 +89,10 @@ Following::Following() : tex(*FollowingInternal::invalid) { // we need a default constructor for QVariant but we don't want it to be valid, we always // initialise Following() with a TextureViewer reference. + Type = FollowType::OutputColor; + Stage = ShaderStage::Pixel; + index = 0; + arrayEl = 0; } Following &Following::operator=(const Following &other) @@ -2270,22 +2274,6 @@ void TextureViewer::texContextItem_triggered() } } -void TextureViewer::showUnused_triggered() -{ - m_ShowUnused = !m_ShowUnused; - - if(m_Ctx.IsCaptureLoaded()) - m_Ctx.RefreshStatus(); -} - -void TextureViewer::showEmpty_triggered() -{ - m_ShowEmpty = !m_ShowEmpty; - - if(m_Ctx.IsCaptureLoaded()) - m_Ctx.RefreshStatus(); -} - void TextureViewer::AddResourceUsageEntry(QMenu &menu, uint32_t start, uint32_t end, ResourceUsage usage) { @@ -2310,8 +2298,6 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input, { QMenu contextMenu(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); QAction usageTitle(tr("Used:"), this); @@ -2320,25 +2306,15 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input, openLockedTab.setIcon(Icons::action_hover()); openResourceInspector.setIcon(Icons::link()); - showUnused.setChecked(m_ShowUnused); - showUnused.setChecked(m_ShowEmpty); - - contextMenu.addAction(&showUnused); - contextMenu.addAction(&showEmpty); - - QObject::connect(&showUnused, &QAction::triggered, this, &TextureViewer::showUnused_triggered); - QObject::connect(&showEmpty, &QAction::triggered, this, &TextureViewer::showEmpty_triggered); - if(m_Ctx.CurPipelineState().SupportsBarriers()) { - contextMenu.addSeparator(); imageLayout.setText(tr("Image is in layout ") + m_Ctx.CurPipelineState().GetResourceLayout(id)); contextMenu.addAction(&imageLayout); + contextMenu.addSeparator(); } if(id != ResourceId()) { - contextMenu.addSeparator(); contextMenu.addAction(&openLockedTab); contextMenu.addAction(&openResourceInspector); @@ -2370,7 +2346,6 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input, } else { - contextMenu.addSeparator(); m_Ctx.Extensions().MenuDisplaying(input ? ContextMenu::TextureViewer_InputThumbnail : ContextMenu::TextureViewer_OutputThumbnail, &contextMenu, {}); @@ -2466,7 +2441,7 @@ void TextureViewer::InitStageResourcePreviews(ShaderStage stage, int arrayLen = resArray != NULL ? resArray->count() : 1; - const bool collapseArray = arrayLen > 8 && (dynamicallyUsedResCount > 20 || m_ShowUnused); + const bool collapseArray = arrayLen > 8 && dynamicallyUsedResCount > 20; for(int i = 0; i < arrayLen; i++) { @@ -2493,12 +2468,6 @@ void TextureViewer::InitStageResourcePreviews(ShaderStage stage, if(res.resourceId != ResourceId() && m_Ctx.GetTexture(res.resourceId) == NULL) show = copy; - // it's bound, but not referenced, and we have "show disabled" - show = show || (m_ShowUnused && res.resourceId != ResourceId()); - - // it's empty, and we have "show empty" - show = show || (m_ShowEmpty && res.resourceId == ResourceId()); - // it's the one we're following show = show || (follow == m_Following); @@ -3121,14 +3090,12 @@ void TextureViewer::OnEventChanged(uint32_t eventId) const ShaderBindpointMapping &mapping = Following::GetMapping(m_Ctx, stage); if(!mapping.readOnlyResources.empty()) - m_ReadOnlyResources[(uint32_t)stage] = - Following::GetReadOnlyResources(m_Ctx, stage, !m_ShowUnused); + m_ReadOnlyResources[(uint32_t)stage] = Following::GetReadOnlyResources(m_Ctx, stage, true); else m_ReadOnlyResources[(uint32_t)stage].clear(); if(!mapping.readWriteResources.empty()) - m_ReadWriteResources[(uint32_t)stage] = - Following::GetReadWriteResources(m_Ctx, stage, !m_ShowUnused); + m_ReadWriteResources[(uint32_t)stage] = Following::GetReadWriteResources(m_Ctx, stage, true); else m_ReadWriteResources[(uint32_t)stage].clear(); } diff --git a/qrenderdoc/Windows/TextureViewer.h b/qrenderdoc/Windows/TextureViewer.h index ec6ba85f9..6bc6d0558 100644 --- a/qrenderdoc/Windows/TextureViewer.h +++ b/qrenderdoc/Windows/TextureViewer.h @@ -219,8 +219,6 @@ private slots: void thumb_clicked(QMouseEvent *); void thumb_doubleClicked(QMouseEvent *); void texContextItem_triggered(); - void showUnused_triggered(); - void showEmpty_triggered(); void zoomOption_returnPressed(); @@ -332,9 +330,6 @@ private: int m_PrevFirstArraySlice = -1; int m_PrevHighestMip = -1; - bool m_ShowEmpty = false; - bool m_ShowUnused = false; - bool m_Visualise = false; bool m_NoRangePaint = false; bool m_RangePoint_Dirty = false;