From c6c8a21054ed828ba87212427e549e23b703c009 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 4 Sep 2018 23:56:13 -0300 Subject: [PATCH] Rename IGalFrameBuffer -> IGalRenderTarget --- .../{IGalFrameBuffer.cs => IGalRenderTarget.cs} | 2 +- Ryujinx.Graphics/Gal/IGalRenderer.cs | 2 +- .../{OGLFrameBuffer.cs => OGLRenderTarget.cs} | 4 ++-- Ryujinx.Graphics/Gal/OpenGL/OGLRenderer.cs | 4 ++-- Ryujinx.Graphics/NvGpuEngine2d.cs | 6 +++--- Ryujinx.Graphics/NvGpuEngine3d.cs | 16 ++++++++-------- Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs | 6 +++--- Ryujinx/Ui/GLScreen.cs | 6 +++--- 8 files changed, 23 insertions(+), 23 deletions(-) rename Ryujinx.Graphics/Gal/{IGalFrameBuffer.cs => IGalRenderTarget.cs} (96%) rename Ryujinx.Graphics/Gal/OpenGL/{OGLFrameBuffer.cs => OGLRenderTarget.cs} (99%) diff --git a/Ryujinx.Graphics/Gal/IGalFrameBuffer.cs b/Ryujinx.Graphics/Gal/IGalRenderTarget.cs similarity index 96% rename from Ryujinx.Graphics/Gal/IGalFrameBuffer.cs rename to Ryujinx.Graphics/Gal/IGalRenderTarget.cs index 108d3d9b1d..c44434ef69 100644 --- a/Ryujinx.Graphics/Gal/IGalFrameBuffer.cs +++ b/Ryujinx.Graphics/Gal/IGalRenderTarget.cs @@ -2,7 +2,7 @@ using System; namespace Ryujinx.Graphics.Gal { - public interface IGalFrameBuffer + public interface IGalRenderTarget { void BindColor(long Key, int Attachment); diff --git a/Ryujinx.Graphics/Gal/IGalRenderer.cs b/Ryujinx.Graphics/Gal/IGalRenderer.cs index b47ac71d0b..41e95a8789 100644 --- a/Ryujinx.Graphics/Gal/IGalRenderer.cs +++ b/Ryujinx.Graphics/Gal/IGalRenderer.cs @@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Gal IGalConstBuffer Buffer { get; } - IGalFrameBuffer FrameBuffer { get; } + IGalRenderTarget RenderTarget { get; } IGalRasterizer Rasterizer { get; } diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs similarity index 99% rename from Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs rename to Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs index b04b24aa95..0c738f051a 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.Gal.OpenGL { - class OGLFrameBuffer : IGalFrameBuffer + class OGLRenderTarget : IGalRenderTarget { private struct Rect { @@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL private int DepthAttachment; private int StencilAttachment; - public OGLFrameBuffer(OGLTexture Texture) + public OGLRenderTarget(OGLTexture Texture) { ColorAttachments = new int[8]; diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderer.cs index 985f1086f0..a23541f3dd 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderer.cs @@ -7,7 +7,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL { public IGalConstBuffer Buffer { get; private set; } - public IGalFrameBuffer FrameBuffer { get; private set; } + public IGalRenderTarget RenderTarget { get; private set; } public IGalRasterizer Rasterizer { get; private set; } @@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL Texture = new OGLTexture(); - FrameBuffer = new OGLFrameBuffer(Texture as OGLTexture); + RenderTarget = new OGLRenderTarget(Texture as OGLTexture); Rasterizer = new OGLRasterizer(); diff --git a/Ryujinx.Graphics/NvGpuEngine2d.cs b/Ryujinx.Graphics/NvGpuEngine2d.cs index f46472d7af..77a03694ee 100644 --- a/Ryujinx.Graphics/NvGpuEngine2d.cs +++ b/Ryujinx.Graphics/NvGpuEngine2d.cs @@ -123,7 +123,7 @@ namespace Ryujinx.Graphics if (IsSrcFb && IsDstFb) { //Frame Buffer -> Frame Buffer copy. - Gpu.Renderer.FrameBuffer.Copy( + Gpu.Renderer.RenderTarget.Copy( SrcKey, DstKey, 0, @@ -138,7 +138,7 @@ namespace Ryujinx.Graphics if (IsSrcFb) { //Frame Buffer -> Texture copy. - Gpu.Renderer.FrameBuffer.GetBufferData(SrcKey, (byte[] Buffer) => + Gpu.Renderer.RenderTarget.GetBufferData(SrcKey, (byte[] Buffer) => { TextureInfo Src = SrcTexture(); TextureInfo Dst = DstTexture(); @@ -156,7 +156,7 @@ namespace Ryujinx.Graphics { byte[] Buffer = TextureReader.Read(Vmm, SrcTexture()); - Gpu.Renderer.FrameBuffer.SetBufferData( + Gpu.Renderer.RenderTarget.SetBufferData( DstKey, DstWidth, DstHeight, diff --git a/Ryujinx.Graphics/NvGpuEngine3d.cs b/Ryujinx.Graphics/NvGpuEngine3d.cs index ca0655bf2e..982504269d 100644 --- a/Ryujinx.Graphics/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/NvGpuEngine3d.cs @@ -177,7 +177,7 @@ namespace Ryujinx.Graphics if (VA == 0 || Format == 0) { - Gpu.Renderer.FrameBuffer.UnbindColor(FbIndex); + Gpu.Renderer.RenderTarget.UnbindColor(FbIndex); return; } @@ -209,9 +209,9 @@ namespace Ryujinx.Graphics Gpu.Renderer.Texture.CreateFb(Key, Size, Image); - Gpu.Renderer.FrameBuffer.BindColor(Key, FbIndex); + Gpu.Renderer.RenderTarget.BindColor(Key, FbIndex); - Gpu.Renderer.FrameBuffer.SetViewport(VpX, VpY, VpW, VpH); + Gpu.Renderer.RenderTarget.SetViewport(VpX, VpY, VpW, VpH); } private void SetZeta(NvGpuVmm Vmm) @@ -224,7 +224,7 @@ namespace Ryujinx.Graphics if (ZA == 0 || Format == 0 || !ZetaEnable) { - Gpu.Renderer.FrameBuffer.UnbindZeta(); + Gpu.Renderer.RenderTarget.UnbindZeta(); return; } @@ -242,7 +242,7 @@ namespace Ryujinx.Graphics Gpu.Renderer.Texture.CreateFb(Key, Size, Image); - Gpu.Renderer.FrameBuffer.BindZeta(Key); + Gpu.Renderer.RenderTarget.BindZeta(Key); } private long[] UploadShaders(NvGpuVmm Vmm) @@ -444,11 +444,11 @@ namespace Ryujinx.Graphics Map[i] = (int)((Control >> Shift) & 7); } - Gpu.Renderer.FrameBuffer.SetMap(Map); + Gpu.Renderer.RenderTarget.SetMap(Map); } else { - Gpu.Renderer.FrameBuffer.SetMap(null); + Gpu.Renderer.RenderTarget.SetMap(null); } } @@ -522,7 +522,7 @@ namespace Ryujinx.Graphics //we shouldn't read anything from memory and bind //the frame buffer texture instead, since we're not //really writing anything to memory. - Gpu.Renderer.FrameBuffer.BindTexture(Key, TexIndex); + Gpu.Renderer.RenderTarget.BindTexture(Key, TexIndex); } else { diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs index 562261f3e1..8f541fbf45 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs @@ -303,7 +303,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int Right = Crop.Right; int Bottom = Crop.Bottom; - Renderer.QueueAction(() => Renderer.FrameBuffer.SetTransform(FlipX, FlipY, Top, Left, Right, Bottom)); + Renderer.QueueAction(() => Renderer.RenderTarget.SetTransform(FlipX, FlipY, Top, Left, Right, Bottom)); //TODO: Support double buffering here aswell, it is broken for GPU //frame buffers because it seems to be completely out of sync. @@ -311,7 +311,7 @@ namespace Ryujinx.HLE.HOS.Services.Android { //Frame buffer is rendered to by the GPU, we can just //bind the frame buffer texture, it's not necessary to read anything. - Renderer.QueueAction(() => Renderer.FrameBuffer.Set(FbAddr)); + Renderer.QueueAction(() => Renderer.RenderTarget.Set(FbAddr)); } else { @@ -321,7 +321,7 @@ namespace Ryujinx.HLE.HOS.Services.Android byte[] Data = TextureReader.Read(Context.Memory, Texture); - Renderer.QueueAction(() => Renderer.FrameBuffer.Set(Data, FbWidth, FbHeight)); + Renderer.QueueAction(() => Renderer.RenderTarget.Set(Data, FbWidth, FbHeight)); } Context.Device.Gpu.Renderer.QueueAction(() => ReleaseBuffer(Slot)); diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs index 2c683f5efb..e7eb26137b 100644 --- a/Ryujinx/Ui/GLScreen.cs +++ b/Ryujinx/Ui/GLScreen.cs @@ -73,7 +73,7 @@ namespace Ryujinx { ResizeEvent = false; - Renderer.FrameBuffer.SetWindowSize(Width, Height); + Renderer.RenderTarget.SetWindowSize(Width, Height); } Ticks += Chrono.ElapsedTicks; @@ -96,7 +96,7 @@ namespace Ryujinx Visible = true; - Renderer.FrameBuffer.SetWindowSize(Width, Height); + Renderer.RenderTarget.SetWindowSize(Width, Height); Context.MakeCurrent(null); @@ -251,7 +251,7 @@ namespace Ryujinx private new void RenderFrame() { - Renderer.FrameBuffer.Render(); + Renderer.RenderTarget.Render(); Device.Statistics.RecordSystemFrameTime();