From 0b6d206daad7202d4e271118b631feb7dd363bbc Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 27 May 2020 06:00:21 -0300 Subject: Omit image format if possible, and fix BA bit (#1280) * Omit image format if possible, and fix BA bit * Match extension name --- Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Ryujinx.Graphics.Shader/Instructions') diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs index af5122be..7bed3f30 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs @@ -1217,6 +1217,13 @@ namespace Ryujinx.Graphics.Shader.Instructions private static TextureFormat GetTextureFormat(EmitterContext context, int handle) { + // When the formatted load extension is supported, we don't need to + // specify a format, we can just declare it without a format and the GPU will handle it. + if (context.Config.GpuAccessor.QuerySupportsImageLoadFormatted()) + { + return TextureFormat.Unknown; + } + var format = context.Config.GpuAccessor.QueryTextureFormat(handle); if (format == TextureFormat.Unknown) -- cgit v1.2.3