mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Add common pipeline state helper to grab stencil face states
This commit is contained in:
@@ -354,6 +354,13 @@ For some APIs that don't distinguish by entry point, this may be empty.
|
||||
)");
|
||||
rdcarray<ColorBlend> GetColorBlends() const;
|
||||
|
||||
DOCUMENT(R"(Retrieves the current stencil states.
|
||||
|
||||
:return: The currently stencil states. Front facing first, back facing second.
|
||||
:rtype: Tuple[StencilFace, StencilFace]
|
||||
)");
|
||||
rdcpair<StencilFace, StencilFace> GetStencilFaces() const;
|
||||
|
||||
DOCUMENT(R"(Determines whether or not independent blending is enabled.
|
||||
|
||||
:return: A boolean indicating if independent blending is enabled.
|
||||
|
||||
@@ -1624,6 +1624,33 @@ rdcarray<ColorBlend> PipeState::GetColorBlends() const
|
||||
return {};
|
||||
}
|
||||
|
||||
rdcpair<StencilFace, StencilFace> PipeState::GetStencilFaces() const
|
||||
{
|
||||
if(IsCaptureLoaded())
|
||||
{
|
||||
if(IsCaptureD3D11())
|
||||
{
|
||||
return {m_D3D11->outputMerger.depthStencilState.frontFace,
|
||||
m_D3D11->outputMerger.depthStencilState.backFace};
|
||||
}
|
||||
else if(IsCaptureD3D12())
|
||||
{
|
||||
return {m_D3D12->outputMerger.depthStencilState.frontFace,
|
||||
m_D3D12->outputMerger.depthStencilState.backFace};
|
||||
}
|
||||
else if(IsCaptureGL())
|
||||
{
|
||||
return {m_GL->stencilState.frontFace, m_GL->stencilState.backFace};
|
||||
}
|
||||
else if(IsCaptureVK())
|
||||
{
|
||||
return {m_Vulkan->depthStencil.frontFace, m_Vulkan->depthStencil.backFace};
|
||||
}
|
||||
}
|
||||
|
||||
return {StencilFace(), StencilFace()};
|
||||
}
|
||||
|
||||
bool PipeState::IsIndependentBlendingEnabled() const
|
||||
{
|
||||
if(IsCaptureLoaded())
|
||||
|
||||
Reference in New Issue
Block a user