Use maximum shared memory size supported by hardware

This commit is contained in:
gdkchan 2019-12-08 23:55:22 -03:00 committed by Thog
parent 375ee0ba96
commit 0d9672f3ae
6 changed files with 28 additions and 15 deletions

View file

@ -7,13 +7,15 @@ namespace Ryujinx.Graphics.OpenGL
{
private static Lazy<bool> _supportsAstcCompression = new Lazy<bool>(() => HasExtension("GL_KHR_texture_compression_astc_ldr"));
private static Lazy<int> _maximumViewportDimensions = new Lazy<int>(() => GetLimit(All.MaxViewportDims));
private static Lazy<int> _storageBufferOffsetAlignment = new Lazy<int>(() => GetLimit(All.ShaderStorageBufferOffsetAlignment));
private static Lazy<int> _maximumViewportDimensions = new Lazy<int>(() => GetLimit(All.MaxViewportDims));
private static Lazy<int> _maximumComputeSharedMemorySize = new Lazy<int>(() => GetLimit(All.MaxComputeSharedMemorySize));
private static Lazy<int> _storageBufferOffsetAlignment = new Lazy<int>(() => GetLimit(All.ShaderStorageBufferOffsetAlignment));
public static bool SupportsAstcCompression => _supportsAstcCompression.Value;
public static int MaximumViewportDimensions => _maximumViewportDimensions.Value;
public static int StorageBufferOffsetAlignment => _storageBufferOffsetAlignment.Value;
public static int MaximumViewportDimensions => _maximumViewportDimensions.Value;
public static int MaximumComputeSharedMemorySize => _maximumComputeSharedMemorySize.Value;
public static int StorageBufferOffsetAlignment => _storageBufferOffsetAlignment.Value;
private static bool HasExtension(string name)
{