1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-24 08:06:05 +00:00

Actually clear the right render target

This commit is contained in:
Isaac Marovitz 2024-06-21 16:39:27 +01:00 committed by Isaac Marovitz
parent 72cbb41609
commit 4578ee53d3
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ namespace Ryujinx.Graphics.Metal
public readonly MTLIndexType IndexType => _currentState.IndexType; public readonly MTLIndexType IndexType => _currentState.IndexType;
public readonly ulong IndexBufferOffset => _currentState.IndexBufferOffset; public readonly ulong IndexBufferOffset => _currentState.IndexBufferOffset;
public readonly PrimitiveTopology Topology => _currentState.Topology; public readonly PrimitiveTopology Topology => _currentState.Topology;
public readonly Texture RenderTarget => _currentState.RenderTargets[0]; public readonly Texture[] RenderTargets => _currentState.RenderTargets;
public readonly Texture DepthStencil => _currentState.DepthStencil; public readonly Texture DepthStencil => _currentState.DepthStencil;
// RGBA32F is the biggest format // RGBA32F is the biggest format

View file

@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Metal
public void ClearRenderTargetColor(int index, int layer, int layerCount, uint componentMask, ColorF color) public void ClearRenderTargetColor(int index, int layer, int layerCount, uint componentMask, ColorF color)
{ {
float[] colors = [color.Red, color.Green, color.Blue, color.Alpha]; float[] colors = [color.Red, color.Green, color.Blue, color.Alpha];
var dst = _encoderStateManager.RenderTarget; var dst = _encoderStateManager.RenderTargets[index];
// TODO: Remove workaround for Wonder which has an invalid texture due to unsupported format // TODO: Remove workaround for Wonder which has an invalid texture due to unsupported format
if (dst == null) if (dst == null)