Fix some Vulkan validation errors (#5452)

* 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
This commit is contained in:
gdkchan
2023-07-14 04:08:52 -03:00
committed by GitHub
parent e5261228d7
commit c5d9e67cb2
8 changed files with 43 additions and 41 deletions

View File

@ -245,13 +245,28 @@ 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;
}
var clearValue = new ClearValue(null, new ClearDepthStencilValue(depthValue, (uint)stencilValue));
var flags = depthMask ? ImageAspectFlags.DepthBit : 0;
if (stencilMask != 0)
{
flags |= ImageAspectFlags.StencilBit;
}
flags &= FramebufferParams.GetDepthStencilAspectFlags();
if (flags == ImageAspectFlags.None)
{
return;
}
if (_renderPass == null)
{
CreateRenderPass();
@ -259,14 +274,6 @@ namespace Ryujinx.Graphics.Vulkan
BeginRenderPass();
var clearValue = new ClearValue(null, new ClearDepthStencilValue(depthValue, (uint)stencilValue));
var flags = depthMask ? ImageAspectFlags.DepthBit : 0;
if (stencilMask != 0)
{
flags |= ImageAspectFlags.StencilBit;
}
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();
}