diff options
author | gdkchan <gab.dark.100@gmail.com> | 2023-07-14 04:08:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 09:08:52 +0200 |
commit | c5d9e67cb24667b659452e02650dd862b5cf1100 (patch) | |
tree | 5a55c3e46e31347cea150952784d8a41a8e10649 /src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | |
parent | e5261228d77240da87a8327147d6b5a889bc29ef (diff) |
Fix some Vulkan validation errors (#5452)1.1.961
* Fix some validation errors and silence the annoying pipeline barrier error
* Remove bogus decref/incref on index buffer state
* Make unsafe blit opt-in rather than opt-out
* Remove Vulkan debugger messages blacklist
* Adjust GetImageUsage to not set the storage bit for multisample textures if not supported
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/PipelineBase.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index b76e482b..b0bc1d0d 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -245,20 +245,13 @@ namespace Ryujinx.Graphics.Vulkan public unsafe void ClearRenderTargetDepthStencil(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, int stencilMask) { - // TODO: Use stencilMask (fully) + // TODO: Use stencilMask (fully). if (FramebufferParams == null || !FramebufferParams.HasDepthStencil) { return; } - if (_renderPass == null) - { - CreateRenderPass(); - } - - BeginRenderPass(); - var clearValue = new ClearValue(null, new ClearDepthStencilValue(depthValue, (uint)stencilValue)); var flags = depthMask ? ImageAspectFlags.DepthBit : 0; @@ -267,6 +260,20 @@ namespace Ryujinx.Graphics.Vulkan flags |= ImageAspectFlags.StencilBit; } + flags &= FramebufferParams.GetDepthStencilAspectFlags(); + + if (flags == ImageAspectFlags.None) + { + return; + } + + if (_renderPass == null) + { + CreateRenderPass(); + } + + BeginRenderPass(); + var attachment = new ClearAttachment(flags, 0, clearValue); var clearRect = FramebufferParams.GetClearRect(ClearScissor, layer, layerCount); @@ -935,7 +942,7 @@ namespace Ryujinx.Graphics.Vulkan SignalStateChange(); - if (_program.IsCompute) + if (internalProgram.IsCompute) { EndRenderPass(); } |