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.OpenGL/HwCapabilities.cs | 4 +++- Ryujinx.Graphics.OpenGL/Renderer.cs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.OpenGL') diff --git a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs index 4b572af8..229b3561 100644 --- a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs +++ b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs @@ -5,7 +5,8 @@ namespace Ryujinx.Graphics.OpenGL { static class HwCapabilities { - private static readonly Lazy _supportsAstcCompression = new Lazy(() => HasExtension("GL_KHR_texture_compression_astc_ldr")); + private static readonly Lazy _supportsAstcCompression = new Lazy(() => HasExtension("GL_KHR_texture_compression_astc_ldr")); + private static readonly Lazy _supportsImageLoadFormatted = new Lazy(() => HasExtension("GL_EXT_shader_image_load_formatted")); private static readonly Lazy _maximumComputeSharedMemorySize = new Lazy(() => GetLimit(All.MaxComputeSharedMemorySize)); private static readonly Lazy _storageBufferOffsetAlignment = new Lazy(() => GetLimit(All.ShaderStorageBufferOffsetAlignment)); @@ -25,6 +26,7 @@ namespace Ryujinx.Graphics.OpenGL private static Lazy _maxSupportedAnisotropy = new Lazy(GL.GetFloat((GetPName)All.MaxTextureMaxAnisotropy)); public static bool SupportsAstcCompression => _supportsAstcCompression.Value; + public static bool SupportsImageLoadFormatted => _supportsImageLoadFormatted.Value; public static bool SupportsNonConstantTextureOffset => _gpuVendor.Value == GpuVendor.Nvidia; public static int MaximumComputeSharedMemorySize => _maximumComputeSharedMemorySize.Value; diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index 15b223f5..c839c296 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -73,6 +73,7 @@ namespace Ryujinx.Graphics.OpenGL { return new Capabilities( HwCapabilities.SupportsAstcCompression, + HwCapabilities.SupportsImageLoadFormatted, HwCapabilities.SupportsNonConstantTextureOffset, HwCapabilities.MaximumComputeSharedMemorySize, HwCapabilities.StorageBufferOffsetAlignment, -- cgit v1.2.3