diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-01-12 18:50:54 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 08:50:54 +1100 |
commit | df820a72def62319fe97236a2006c64bfb7c065a (patch) | |
tree | 0e5d2c4f278548245e828e67194ff03d04532ce3 /Ryujinx.Graphics.OpenGL/Pipeline.cs | |
parent | 68f6b79fd3f06ea572d5f0edd5fc8cbaee1ae449 (diff) |
Implement clear buffer (fast path) (#1902)
* Implement clear buffer (fast path)
* Remove blank line
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Pipeline.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index 8b0a86aa..b6a34e9c 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -91,6 +91,11 @@ namespace Ryujinx.Graphics.OpenGL _tfEnabled = true; } + public void ClearBuffer(BufferHandle destination, int offset, int size, uint value) + { + Buffer.Clear(destination, offset, size, value); + } + public void ClearRenderTargetColor(int index, uint componentMask, ColorF color) { GL.ColorMask( @@ -102,7 +107,7 @@ namespace Ryujinx.Graphics.OpenGL float[] colors = new float[] { color.Red, color.Green, color.Blue, color.Alpha }; - GL.ClearBuffer(ClearBuffer.Color, index, colors); + GL.ClearBuffer(OpenTK.Graphics.OpenGL.ClearBuffer.Color, index, colors); RestoreComponentMask(index); @@ -133,11 +138,11 @@ namespace Ryujinx.Graphics.OpenGL } else if (depthMask) { - GL.ClearBuffer(ClearBuffer.Depth, 0, ref depthValue); + GL.ClearBuffer(OpenTK.Graphics.OpenGL.ClearBuffer.Depth, 0, ref depthValue); } else if (stencilMask != 0) { - GL.ClearBuffer(ClearBuffer.Stencil, 0, ref stencilValue); + GL.ClearBuffer(OpenTK.Graphics.OpenGL.ClearBuffer.Stencil, 0, ref stencilValue); } if (stencilMaskChanged) |