From c5d9e67cb24667b659452e02650dd862b5cf1100 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 14 Jul 2023 04:08:52 -0300 Subject: 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 --- src/Ryujinx.Graphics.Vulkan/TextureView.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/Ryujinx.Graphics.Vulkan/TextureView.cs') diff --git a/src/Ryujinx.Graphics.Vulkan/TextureView.cs b/src/Ryujinx.Graphics.Vulkan/TextureView.cs index bb14ea61..9fc50f67 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -116,7 +116,14 @@ namespace Ryujinx.Graphics.Vulkan return new Auto(new DisposableImageView(gd.Api, device, imageView), null, storage.GetImage()); } - _imageView = CreateImageView(componentMapping, subresourceRange, type, ImageUsageFlags.SampledBit); + ImageUsageFlags shaderUsage = ImageUsageFlags.SampledBit; + + if (info.Format.IsImageCompatible()) + { + shaderUsage |= ImageUsageFlags.StorageBit; + } + + _imageView = CreateImageView(componentMapping, subresourceRange, type, shaderUsage); // Framebuffer attachments and storage images requires a identity component mapping. var identityComponentMapping = new ComponentMapping( @@ -378,7 +385,7 @@ namespace Ryujinx.Graphics.Vulkan bool isDepthOrStencil = dst.Info.Format.IsDepthOrStencil(); - if (VulkanConfiguration.UseSlowSafeBlitOnAmd && (_gd.Vendor == Vendor.Amd || _gd.IsMoltenVk)) + if (!VulkanConfiguration.UseUnsafeBlit || (_gd.Vendor != Vendor.Nvidia && _gd.Vendor != Vendor.Intel)) { _gd.HelperShader.Blit( _gd, -- cgit v1.2.3