aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-05-27 06:00:21 -0300
committerGitHub <noreply@github.com>2020-05-27 11:00:21 +0200
commit0b6d206daad7202d4e271118b631feb7dd363bbc (patch)
tree61f5e40728fb77eb2ea4628cb4b94caef86b4a0a /Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
parentb663cd22c87f13f40e1753bf22bef12d08bf6f3e (diff)
Omit image format if possible, and fix BA bit (#1280)
* Omit image format if possible, and fix BA bit * Match extension name
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs7
1 files changed, 7 insertions, 0 deletions
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)