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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user