Use maximum shared memory size supported by hardware
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -64,6 +64,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
return new Capabilities(
|
||||
HwCapabilities.SupportsAstcCompression,
|
||||
HwCapabilities.MaximumViewportDimensions,
|
||||
HwCapabilities.MaximumComputeSharedMemorySize,
|
||||
HwCapabilities.StorageBufferOffsetAlignment);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user