Implement clear buffer (fast path) (#1902)
* Implement clear buffer (fast path) * Remove blank line
This commit is contained in:
parent
68f6b79fd3
commit
df820a72de
8 changed files with 125 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue