diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-01-01 12:39:09 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 92703af5558258da078d876b1d46e916b1065978 (patch) | |
| tree | 6579863103b145b3e7345e42fc03caf870622b43 /Ryujinx.Graphics.OpenGL | |
| parent | 40ef18d7599971c7387779d752a73568685d3432 (diff) | |
Address PR feedback
Diffstat (limited to 'Ryujinx.Graphics.OpenGL')
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/HwCapabilities.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/Renderer.cs | 1 | ||||
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/TextureView.cs | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs index dc147484..bb8e8339 100644 --- a/Ryujinx.Graphics.OpenGL/HwCapabilities.cs +++ b/Ryujinx.Graphics.OpenGL/HwCapabilities.cs @@ -7,7 +7,6 @@ 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> _maximumComputeSharedMemorySize = new Lazy<int>(() => GetLimit(All.MaxComputeSharedMemorySize)); private static Lazy<int> _storageBufferOffsetAlignment = new Lazy<int>(() => GetLimit(All.ShaderStorageBufferOffsetAlignment)); @@ -16,7 +15,6 @@ namespace Ryujinx.Graphics.OpenGL 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; diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index e6021f51..86ce9c7c 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -64,7 +64,6 @@ namespace Ryujinx.Graphics.OpenGL return new Capabilities( HwCapabilities.SupportsAstcCompression, HwCapabilities.SupportsNonConstantTextureOffset, - HwCapabilities.MaximumViewportDimensions, HwCapabilities.MaximumComputeSharedMemorySize, HwCapabilities.StorageBufferOffsetAlignment); } diff --git a/Ryujinx.Graphics.OpenGL/TextureView.cs b/Ryujinx.Graphics.OpenGL/TextureView.cs index 563e0ca6..da0872f6 100644 --- a/Ryujinx.Graphics.OpenGL/TextureView.cs +++ b/Ryujinx.Graphics.OpenGL/TextureView.cs @@ -104,6 +104,7 @@ namespace Ryujinx.Graphics.OpenGL GL.TexParameter(target, TextureParameterName.TextureMaxLevel, maxLevel); + // TODO: This requires ARB_stencil_texturing, we should uncomment and test this. // GL.TexParameter(target, TextureParameterName.DepthStencilTextureMode, (int)_info.DepthStencilMode.Convert()); } @@ -118,7 +119,11 @@ namespace Ryujinx.Graphics.OpenGL } else { - // TODO: Improve + // TODO: Most graphics APIs doesn't support creating a texture view from a compressed format + // with a non-compressed format (or vice-versa), however NVN seems to support it. + // So we emulate that here with a texture copy (see the first CopyTo overload). + // However right now it only does a single copy right after the view is created, + // so it doesn't work for all cases. TextureView emulatedView = (TextureView)_renderer.CreateTexture(info); emulatedView._emulatedViewParent = this; |
