mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
reset certain state before doing blit or clear
This commit is contained in:
parent
57a173a671
commit
8d7be4fe25
1 changed files with 6 additions and 0 deletions
|
@ -73,6 +73,8 @@ namespace Ryujinx.Graphics.Metal
|
|||
_pipeline.SaveState();
|
||||
|
||||
_pipeline.SetProgram(_programColorBlit);
|
||||
_pipeline.SetFaceCulling(false, Face.Front);
|
||||
_pipeline.SetDepthTest(new DepthTestDescriptor(false, false, CompareOp.Always));
|
||||
// Viewport and scissor needs to be set before render pass begin so as not to bind the old ones
|
||||
_pipeline.SetViewports([]);
|
||||
_pipeline.SetScissors([]);
|
||||
|
@ -110,6 +112,8 @@ namespace Ryujinx.Graphics.Metal
|
|||
_pipeline.SetUniformBuffers([new BufferAssignment(0, range)]);
|
||||
|
||||
_pipeline.SetProgram(_programsColorClear[index]);
|
||||
_pipeline.SetFaceCulling(false, Face.Front);
|
||||
_pipeline.SetDepthTest(new DepthTestDescriptor(false, false, CompareOp.Always));
|
||||
// _pipeline.SetRenderTargetColorMasks([componentMask]);
|
||||
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
|
||||
_pipeline.Draw(4, 1, 0, 0);
|
||||
|
@ -145,6 +149,8 @@ namespace Ryujinx.Graphics.Metal
|
|||
_pipeline.SetUniformBuffers([new BufferAssignment(0, range)]);
|
||||
|
||||
_pipeline.SetProgram(_programDepthStencilClear);
|
||||
_pipeline.SetFaceCulling(false, Face.Front);
|
||||
_pipeline.SetDepthTest(new DepthTestDescriptor(false, false, CompareOp.Always));
|
||||
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
|
||||
_pipeline.SetDepthTest(new DepthTestDescriptor(true, depthMask, CompareOp.Always));
|
||||
// _pipeline.SetStencilTest(CreateStencilTestDescriptor(stencilMask != 0, stencilValue, 0xFF, stencilMask));
|
||||
|
|
Loading…
Reference in a new issue