Support non-constant texture offsets on non-NVIDIA gpus
This commit is contained in:
@ -11,11 +11,14 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
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;
|
||||
private static Lazy<bool> _isNvidiaDriver = new Lazy<bool>(() => IsNvidiaDriver());
|
||||
|
||||
public static int MaximumViewportDimensions => _maximumViewportDimensions.Value;
|
||||
public static int MaximumComputeSharedMemorySize => _maximumComputeSharedMemorySize.Value;
|
||||
public static int StorageBufferOffsetAlignment => _storageBufferOffsetAlignment.Value;
|
||||
public static bool SupportsAstcCompression => _supportsAstcCompression.Value;
|
||||
public static bool SupportsNonConstantTextureOffset => _isNvidiaDriver.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)
|
||||
{
|
||||
@ -36,5 +39,10 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
{
|
||||
return GL.GetInteger((GetPName)name);
|
||||
}
|
||||
|
||||
private static bool IsNvidiaDriver()
|
||||
{
|
||||
return GL.GetString(StringName.Vendor).Equals("NVIDIA Corporation");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user