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

@ -14,6 +14,7 @@ namespace Ryujinx.Graphics.Shader.Translation
{
bool isVertexShader = config.Stage == ShaderStage.Vertex;
bool hasConstantBufferDrawParameters = config.GpuAccessor.QueryHasConstantBufferDrawParameters();
bool supportsSnormBufferTextureFormat = config.GpuAccessor.QueryHostSupportsSnormBufferTextureFormat();
for (int blkIndex = 0; blkIndex < blocks.Length; blkIndex++)
{
@ -52,7 +53,7 @@ namespace Ryujinx.Graphics.Shader.Translation
{
node = RewriteTextureSample(node, config);
if (texOp.Type == SamplerType.TextureBuffer)
if (texOp.Type == SamplerType.TextureBuffer && !supportsSnormBufferTextureFormat)
{
node = InsertSnormNormalization(node, config);
}