Allow SNorm buffer texture formats on Vulkan (#3957)

* Allow SNorm buffer texture formats on Vulkan

* Shader cache version bump
This commit is contained in:
gdkchan 2022-12-04 15:36:03 -03:00 committed by GitHub
parent 73aed239c3
commit 17a1cab5d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 5 deletions

View file

@ -1088,10 +1088,9 @@ namespace Ryujinx.Graphics.Gpu.Image
{
FormatInfo formatInfo = TextureCompatibility.ToHostCompatibleFormat(info, caps);
if (info.Target == Target.TextureBuffer)
if (info.Target == Target.TextureBuffer && !caps.SupportsSnormBufferTextureFormat)
{
// We assume that the host does not support signed normalized format
// (as is the case with OpenGL), so we just use a unsigned format.
// If the host does not support signed normalized formats, we use a signed integer format instead.
// The shader will need the appropriate conversion code to compensate.
switch (formatInfo.Format)
{