mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
Allow multiple depth targets to be viewable in the TextureViewer
This commit is contained in:
committed by
Baldur Karlsson
parent
588d205279
commit
f578e62684
@@ -388,6 +388,13 @@ For some APIs that don't distinguish by entry point, this may be empty.
|
||||
)");
|
||||
BoundResource GetDepthTarget() const;
|
||||
|
||||
DOCUMENT(R"(Retrieves the read/write resources bound to the depth-stencil resolve output.
|
||||
|
||||
:return: The currently bound depth-stencil resolve resource.
|
||||
:rtype: BoundResource
|
||||
)");
|
||||
BoundResource GetDepthResolveTarget() const;
|
||||
|
||||
DOCUMENT(R"(Retrieves the resources bound to the color outputs.
|
||||
|
||||
:return: The currently bound output targets.
|
||||
|
||||
@@ -1760,6 +1760,32 @@ BoundResource PipeState::GetDepthTarget() const
|
||||
return BoundResource();
|
||||
}
|
||||
|
||||
BoundResource PipeState::GetDepthResolveTarget() const
|
||||
{
|
||||
if(IsCaptureLoaded())
|
||||
{
|
||||
if(IsCaptureVK())
|
||||
{
|
||||
const VKPipe::RenderPass &rp = m_Vulkan->currentPass.renderpass;
|
||||
const VKPipe::Framebuffer &fb = m_Vulkan->currentPass.framebuffer;
|
||||
|
||||
if(rp.depthstencilResolveAttachment >= 0 &&
|
||||
rp.depthstencilResolveAttachment < fb.attachments.count())
|
||||
{
|
||||
BoundResource ret;
|
||||
ret.resourceId = fb.attachments[rp.depthstencilResolveAttachment].imageResourceId;
|
||||
ret.firstMip = (int)fb.attachments[rp.depthstencilResolveAttachment].firstMip;
|
||||
ret.firstSlice = (int)fb.attachments[rp.depthstencilResolveAttachment].firstSlice;
|
||||
ret.typeCast = fb.attachments[rp.depthstencilResolveAttachment].viewFormat.compType;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return BoundResource();
|
||||
}
|
||||
}
|
||||
return BoundResource();
|
||||
}
|
||||
|
||||
rdcarray<BoundResource> PipeState::GetOutputTargets() const
|
||||
{
|
||||
rdcarray<BoundResource> ret;
|
||||
|
||||
Reference in New Issue
Block a user