Shitty Clears + Inline Buffer Improvements?

This commit is contained in:
Isaac Marovitz 2024-05-22 17:21:44 -04:00 committed by Isaac Marovitz
parent 087bf71a13
commit 8feee9c005
11 changed files with 124 additions and 61 deletions

View file

@ -5,6 +5,7 @@ using SharpMetal.Foundation;
using SharpMetal.Metal;
using SharpMetal.QuartzCore;
using System;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
@ -203,7 +204,13 @@ namespace Ryujinx.Graphics.Metal
public void ClearRenderTargetColor(int index, int layer, int layerCount, uint componentMask, ColorF color)
{
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
float[] colors = [color.Red, color.Green, color.Blue, color.Alpha];
Texture target = _encoderStateManager.RenderTargets[index];
_encoderStateManager.SwapStates();
_helperShader.ClearColor(target, colors);
}
public void ClearRenderTargetDepthStencil(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, int stencilMask)