mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00
Implement support for masked stencil clears on Vulkan (#5589)
* Implement support for masked stencil clears on Vulkan * PR feedback
This commit is contained in:
parent
c6a699414a
commit
153b8bfc7c
7 changed files with 131 additions and 38 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue