Replace glFinish with barrier for WaitForIdle (#878)
This commit is contained in:
parent
88f78ae6c8
commit
2bb39ff03e
5 changed files with 8 additions and 8 deletions
|
@ -4,6 +4,8 @@ namespace Ryujinx.Graphics.GAL
|
||||||
{
|
{
|
||||||
public interface IPipeline
|
public interface IPipeline
|
||||||
{
|
{
|
||||||
|
void Barrier();
|
||||||
|
|
||||||
void ClearRenderTargetColor(int index, uint componentMask, ColorF color);
|
void ClearRenderTargetColor(int index, uint componentMask, ColorF color);
|
||||||
|
|
||||||
void ClearRenderTargetDepthStencil(
|
void ClearRenderTargetDepthStencil(
|
||||||
|
|
|
@ -18,8 +18,6 @@ namespace Ryujinx.Graphics.GAL
|
||||||
ISampler CreateSampler(SamplerCreateInfo info);
|
ISampler CreateSampler(SamplerCreateInfo info);
|
||||||
ITexture CreateTexture(TextureCreateInfo info);
|
ITexture CreateTexture(TextureCreateInfo info);
|
||||||
|
|
||||||
void FlushPipelines();
|
|
||||||
|
|
||||||
Capabilities GetCapabilities();
|
Capabilities GetCapabilities();
|
||||||
|
|
||||||
ulong GetCounter(CounterType type);
|
ulong GetCounter(CounterType type);
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace Ryujinx.Graphics.Gpu
|
||||||
{
|
{
|
||||||
_context.Methods.PerformDeferredDraws();
|
_context.Methods.PerformDeferredDraws();
|
||||||
|
|
||||||
_context.Renderer.FlushPipelines();
|
_context.Renderer.Pipeline.Barrier();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,11 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
_clipDepthMode = ClipDepthMode.NegativeOneToOne;
|
_clipDepthMode = ClipDepthMode.NegativeOneToOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Barrier()
|
||||||
|
{
|
||||||
|
GL.MemoryBarrier(MemoryBarrierFlags.AllBarrierBits);
|
||||||
|
}
|
||||||
|
|
||||||
public void ClearRenderTargetColor(int index, uint componentMask, ColorF color)
|
public void ClearRenderTargetColor(int index, uint componentMask, ColorF color)
|
||||||
{
|
{
|
||||||
GL.ColorMask(
|
GL.ColorMask(
|
||||||
|
|
|
@ -55,11 +55,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
return new TextureStorage(this, info).CreateDefaultView();
|
return new TextureStorage(this, info).CreateDefaultView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FlushPipelines()
|
|
||||||
{
|
|
||||||
GL.Finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Capabilities GetCapabilities()
|
public Capabilities GetCapabilities()
|
||||||
{
|
{
|
||||||
return new Capabilities(
|
return new Capabilities(
|
||||||
|
|
Reference in a new issue