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 95680bd4d2
commit 800dae50e5
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);
}