From 9ace6b9285c60c70aba153110bef3eb5372badb7 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 23 Oct 2018 17:59:52 -0300 Subject: Fix for render target and a shader compilation issue (#471) * Fix render target using possibly deleted or wrong handles * Fix basic blocks with only a KIL instruction on the shader translator * Formatting fix --- Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs') diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs index 6c608528..274b94ea 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs @@ -8,6 +8,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL { private OGLCachedResource TextureCache; + public EventHandler TextureDeleted { get; set; } + public OGLTexture() { TextureCache = new OGLCachedResource(DeleteTexture); @@ -23,8 +25,10 @@ namespace Ryujinx.Graphics.Gal.OpenGL TextureCache.Unlock(); } - private static void DeleteTexture(ImageHandler CachedImage) + private void DeleteTexture(ImageHandler CachedImage) { + TextureDeleted?.Invoke(this, CachedImage.Handle); + GL.DeleteTexture(CachedImage.Handle); } -- cgit v1.2.3