aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL
diff options
context:
space:
mode:
authorXpl0itR <xpl0itr@outlook.com>2020-03-30 22:38:52 +0100
committerGitHub <noreply@github.com>2020-03-31 08:38:52 +1100
commit12d49c37d219950ccb22c3979ecb0b34262a7155 (patch)
treeac6e73776a332e833d0f59d1b72f281eaff07098 /Ryujinx.Graphics.OpenGL
parent5a52ca5071425e3f9600576679bec609e7cead89 (diff)
Make max anisotropy configurable (#1043)
* Make max anisotropy configurable * Move opengl command to opengl project * Add GUI option
Diffstat (limited to 'Ryujinx.Graphics.OpenGL')
-rw-r--r--Ryujinx.Graphics.OpenGL/HwCapabilities.cs4
-rw-r--r--Ryujinx.Graphics.OpenGL/Renderer.cs3
2 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs
index 3d72cb7d..4b572af8 100644
--- a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs
+++ b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs
@@ -22,12 +22,16 @@ namespace Ryujinx.Graphics.OpenGL
public static GpuVendor Vendor => _gpuVendor.Value;
+ private static Lazy<float> _maxSupportedAnisotropy = new Lazy<float>(GL.GetFloat((GetPName)All.MaxTextureMaxAnisotropy));
+
public static bool SupportsAstcCompression => _supportsAstcCompression.Value;
public static bool SupportsNonConstantTextureOffset => _gpuVendor.Value == GpuVendor.Nvidia;
public static int MaximumComputeSharedMemorySize => _maximumComputeSharedMemorySize.Value;
public static int StorageBufferOffsetAlignment => _storageBufferOffsetAlignment.Value;
+ public static float MaxSupportedAnisotropy => _maxSupportedAnisotropy.Value;
+
private static bool HasExtension(string name)
{
int numExtensions = GL.GetInteger(GetPName.NumExtensions);
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs
index cf2adc45..504a947b 100644
--- a/Ryujinx.Graphics.OpenGL/Renderer.cs
+++ b/Ryujinx.Graphics.OpenGL/Renderer.cs
@@ -67,7 +67,8 @@ namespace Ryujinx.Graphics.OpenGL
HwCapabilities.SupportsAstcCompression,
HwCapabilities.SupportsNonConstantTextureOffset,
HwCapabilities.MaximumComputeSharedMemorySize,
- HwCapabilities.StorageBufferOffsetAlignment);
+ HwCapabilities.StorageBufferOffsetAlignment,
+ HwCapabilities.MaxSupportedAnisotropy);
}
public ulong GetCounter(CounterType type)