diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-10-23 17:59:52 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-23 17:59:52 -0300 |
| commit | 9ace6b9285c60c70aba153110bef3eb5372badb7 (patch) | |
| tree | a82257c23c20189896b59bc4e590b7f3f041c469 /Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | |
| parent | 044b84b078c910c9c1d16c5351cd037716db70e3 (diff) | |
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
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | 6 |
1 files changed, 5 insertions, 1 deletions
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<ImageHandler> TextureCache; + public EventHandler<int> TextureDeleted { get; set; } + public OGLTexture() { TextureCache = new OGLCachedResource<ImageHandler>(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); } |
