From cb46ec9c519b5713be92bb6f891c254b6a1e3238 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 12 Jul 2024 15:05:13 +0100 Subject: [PATCH] Set correct stage for fake copy descriptors in texture viewer --- qrenderdoc/Windows/TextureViewer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index e79330b7a..3a0ae3598 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -97,10 +97,12 @@ static Descriptor MakeDescriptor(ResourceId res, Subresource sub = Subresource() return ret; } -static UsedDescriptor MakeUsedDescriptor(ResourceId res, Subresource sub = Subresource()) +static UsedDescriptor MakeUsedDescriptor(ShaderStage stage, ResourceId res, + Subresource sub = Subresource()) { UsedDescriptor ret; ret.descriptor = MakeDescriptor(res, sub); + ret.access.stage = stage; ret.access.type = ret.descriptor.type; ret.access.index = DescriptorAccess::NoShaderBinding; ret.access.byteSize = 1; @@ -336,7 +338,8 @@ rdcarray Following::GetReadOnlyResources(ICaptureContext &ctx, S // only return copy source for one stage if(copy && stage == ShaderStage::Pixel) - ret.push_back(MakeUsedDescriptor(curAction->copySource, curAction->copySourceSubresource)); + ret.push_back( + MakeUsedDescriptor(stage, curAction->copySource, curAction->copySourceSubresource)); return ret; }