From 92703af5558258da078d876b1d46e916b1065978 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 1 Jan 2020 12:39:09 -0300 Subject: Address PR feedback --- Ryujinx.Graphics.OpenGL/HwCapabilities.cs | 2 -- Ryujinx.Graphics.OpenGL/Renderer.cs | 1 - Ryujinx.Graphics.OpenGL/TextureView.cs | 7 ++++++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Graphics.OpenGL') 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 _supportsAstcCompression = new Lazy(() => HasExtension("GL_KHR_texture_compression_astc_ldr")); - private static Lazy _maximumViewportDimensions = new Lazy(() => GetLimit(All.MaxViewportDims)); private static Lazy _maximumComputeSharedMemorySize = new Lazy(() => GetLimit(All.MaxComputeSharedMemorySize)); private static Lazy _storageBufferOffsetAlignment = new Lazy(() => 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; -- cgit v1.2.3