Implement support for masked stencil clears on Vulkan (#5589)
* Implement support for masked stencil clears on Vulkan * PR feedback
This commit is contained in:
@ -243,10 +243,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
Gd.Api.CmdClearAttachments(CommandBuffer, 1, &attachment, 1, &clearRect);
|
||||
}
|
||||
|
||||
public unsafe void ClearRenderTargetDepthStencil(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, int stencilMask)
|
||||
public unsafe void ClearRenderTargetDepthStencil(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, bool stencilMask)
|
||||
{
|
||||
// TODO: Use stencilMask (fully).
|
||||
|
||||
if (FramebufferParams == null || !FramebufferParams.HasDepthStencil)
|
||||
{
|
||||
return;
|
||||
@ -255,7 +253,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
var clearValue = new ClearValue(null, new ClearDepthStencilValue(depthValue, (uint)stencilValue));
|
||||
var flags = depthMask ? ImageAspectFlags.DepthBit : 0;
|
||||
|
||||
if (stencilMask != 0)
|
||||
if (stencilMask)
|
||||
{
|
||||
flags |= ImageAspectFlags.StencilBit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user