From c002c71fe84f911e465a22c420ed7ce644f15038 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 21 Jan 2021 10:43:37 +0000 Subject: [PATCH] Don't display buffers as thumbnails in texture viewer * This is a holdover from simpler binding times, these days it makes more sense to omit buffers than try to hold onto those bindings even when they don't contain textures. --- qrenderdoc/Windows/TextureViewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index bd10a8af5..12c504b92 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -2490,6 +2490,10 @@ void TextureViewer::InitStageResourcePreviews(ShaderStage stage, // show if it's referenced by the shader - regardless of empty or not bool show = key.used || copy; + // omit buffers even if the shader uses them. + if(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());