From 6921b37d8e75b765b42877990b4881df3b478558 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 9 Sep 2016 12:27:52 +0200 Subject: [PATCH] Don't display previews for sampler resources --- renderdocui/Windows/TextureViewer.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/renderdocui/Windows/TextureViewer.cs b/renderdocui/Windows/TextureViewer.cs index c27e18a6e..68137e4a5 100644 --- a/renderdocui/Windows/TextureViewer.cs +++ b/renderdocui/Windows/TextureViewer.cs @@ -1331,7 +1331,8 @@ namespace renderdocui.Windows FormatComponentType typeHint = resArray != null ? resArray[arrayIdx].typeHint : FormatComponentType.None; bool used = key.used; - bool skip = false; + bool samplerBind = false; + bool otherBind = false; string bindName = ""; @@ -1340,11 +1341,20 @@ namespace renderdocui.Windows if (bind.bindPoint == idx && bind.IsSRV) { bindName = bind.name; + otherBind = true; break; } + + if (bind.bindPoint == idx) + { + if(bind.IsSampler && !bind.IsSRV) + samplerBind = true; + else + otherBind = true; + } } - if (skip) + if (samplerBind && !otherBind) continue; if (copy)