Fix a bunch of issues with texture copy and flush (#32)

* Fix a bunch of issues with texture copy and flush

* TextureCopy helper class, fix clear bug
This commit is contained in:
riperiperi 2024-07-03 10:27:03 +01:00 committed by Isaac Marovitz
parent 0c1acb5107
commit 7b9b23e500
5 changed files with 351 additions and 115 deletions

View file

@ -318,11 +318,14 @@ namespace Ryujinx.Graphics.Metal
0f,
1f);
Span<uint> componentMasks = stackalloc uint[index + 1];
componentMasks[index] = componentMask;
_pipeline.SetProgram(_programsColorClear[index]);
_pipeline.SetBlendState(index, new BlendDescriptor());
_pipeline.SetFaceCulling(false, Face.Front);
_pipeline.SetDepthTest(new DepthTestDescriptor(false, false, CompareOp.Always));
_pipeline.SetRenderTargetColorMasks([componentMask]);
_pipeline.SetRenderTargetColorMasks(componentMasks);
_pipeline.SetViewports(viewports);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.Draw(4, 1, 0, 0);