diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-07-09 23:01:59 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-09 23:01:59 -0300 |
| commit | 1968386808bb48f823b1877b0e5ff8c6e2f8bd49 (patch) | |
| tree | 40b4dd9e9dc1f756af99fcd571a7ef5272f4cc8f /Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs | |
| parent | 791fe70810f0f0f417c74aaff5446551bed78fee (diff) | |
Add locking methods to the ogl resource cache (#238)
* Add locking methods to the ogl resource cache
* Remove some unused arguments
* Add the ZF32 texture format
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs index a4ec7f87..0dc56966 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs @@ -71,6 +71,18 @@ namespace Ryujinx.Graphics.Gal.OpenGL IndexBuffer = new IbInfo(); } + public void LockCaches() + { + VboCache.Lock(); + IboCache.Lock(); + } + + public void UnlockCaches() + { + VboCache.Unlock(); + IboCache.Unlock(); + } + public void ClearBuffers(GalClearBufferFlags Flags) { ClearBufferMask Mask = ClearBufferMask.ColorBufferBit; @@ -223,7 +235,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL GL.BufferData(BufferTarget.ElementArrayBuffer, Length, Buffer, BufferUsageHint.StreamDraw); } - public void SetVertexArray(int VbIndex, int Stride, long VboKey, GalVertexAttrib[] Attribs) + public void SetVertexArray(int Stride, long VboKey, GalVertexAttrib[] Attribs) { if (!VboCache.TryGetValue(VboKey, out int VboHandle)) { @@ -270,7 +282,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL } } - public void SetIndexArray(long Key, int Size, GalIndexFormat Format) + public void SetIndexArray(int Size, GalIndexFormat Format) { IndexBuffer.Type = OGLEnumConverter.GetDrawElementsType(Format); |
