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/TextureView.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/TextureView.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Vulkan/TextureView.cs | 11 |
1 files changed, 9 insertions, 2 deletions
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<DisposableImageView>(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, |