diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-10-17 18:02:23 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-17 18:02:23 -0300 |
| commit | 0e1e094b7a8f0134831fc4cebdb0841b9c10fe6a (patch) | |
| tree | 81ba6446851a033f27adeafbfb94751032108047 /Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs | |
| parent | 02a8e7fc9369d7882db08a69d108beefb0f98677 (diff) | |
Improve texture tables (#457)
* Improve texture tables
* More renaming and other tweaks
* Minor tweaks
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs index 0de070b5..e0c4854e 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs @@ -59,9 +59,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL private const int NativeWidth = 1280; private const int NativeHeight = 720; - private const int RenderTargetsCount = 8; - - private const GalImageFormat RawFormat = GalImageFormat.A8B8G8R8 | GalImageFormat.Unorm; + private const int RenderTargetsCount = GalPipelineState.RenderTargetsCount; private OGLTexture Texture; @@ -115,15 +113,16 @@ namespace Ryujinx.Graphics.Gal.OpenGL for (int Attachment = 0; Attachment < RenderTargetsCount; Attachment++) { - if (Attachments.Colors[Attachment] == OldAttachments.Colors[Attachment]) + long Key = Attachments.Colors[Attachment]; + + if (Key == OldAttachments.Colors[Attachment]) { continue; } int Handle = 0; - if (Attachments.Colors[Attachment] != 0 && - Texture.TryGetImageHandler(Attachments.Colors[Attachment], out CachedImage)) + if (Key != 0 && Texture.TryGetImageHandler(Key, out CachedImage)) { Handle = CachedImage.Handle; } @@ -178,7 +177,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL if (OGLExtension.ViewportArray) { - GL.ViewportArray(0, 8, Viewports); + GL.ViewportArray(0, RenderTargetsCount, Viewports); } else { |
