From 3cb1fa0e853efc04cc183d3ee75ec1bbe2c845a4 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 25 Apr 2020 10:02:18 -0300 Subject: Implement texture buffers (#1152) * Implement texture buffers * Throw NotSupportedException where appropriate --- Ryujinx.Graphics.OpenGL/Pipeline.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs') diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index eec2b643..e313595d 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -26,7 +26,7 @@ namespace Ryujinx.Graphics.OpenGL private bool _depthTest; private bool _hasDepthBuffer; - private TextureView _unit0Texture; + private TextureBase _unit0Texture; private ClipOrigin _clipOrigin; private ClipDepthMode _clipDepthMode; @@ -616,13 +616,13 @@ namespace Ryujinx.Graphics.OpenGL if (unit != -1 && texture != null) { - TextureView view = (TextureView)texture; + TextureBase texBase = (TextureBase)texture; - FormatInfo formatInfo = FormatTable.GetFormatInfo(view.Format); + FormatInfo formatInfo = FormatTable.GetFormatInfo(texBase.Format); SizedInternalFormat format = (SizedInternalFormat)formatInfo.PixelInternalFormat; - GL.BindImageTexture(unit, view.Handle, 0, true, 0, TextureAccess.ReadWrite, format); + GL.BindImageTexture(unit, texBase.Handle, 0, true, 0, TextureAccess.ReadWrite, format); } } @@ -801,11 +801,11 @@ namespace Ryujinx.Graphics.OpenGL { if (unit == 0) { - _unit0Texture = ((TextureView)texture); + _unit0Texture = (TextureBase)texture; } else { - ((TextureView)texture).Bind(unit); + ((TextureBase)texture).Bind(unit); } } } -- cgit v1.2.3