mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-13 03:29:56 +01:00
Workaround for Wonder
This commit is contained in:
parent
bb4cb531f2
commit
fad653c12e
1 changed files with 14 additions and 0 deletions
|
@ -252,6 +252,13 @@ namespace Ryujinx.Graphics.Metal
|
||||||
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.RenderTarget;
|
||||||
|
|
||||||
|
// TODO: Remove workaround for Wonder which has an invalid texture due to unsupported format
|
||||||
|
if (dst == null)
|
||||||
|
{
|
||||||
|
Logger.Warning?.PrintMsg(LogClass.Gpu, "Attempted to clear invalid render target!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_helperShader.ClearColor(index, colors, componentMask, dst.Width, dst.Height);
|
_helperShader.ClearColor(index, colors, componentMask, dst.Width, dst.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,6 +266,13 @@ namespace Ryujinx.Graphics.Metal
|
||||||
{
|
{
|
||||||
var depthStencil = _encoderStateManager.DepthStencil;
|
var depthStencil = _encoderStateManager.DepthStencil;
|
||||||
|
|
||||||
|
// TODO: Remove workaround for Wonder which has an invalid texture due to unsupported format
|
||||||
|
if (depthStencil == null)
|
||||||
|
{
|
||||||
|
Logger.Warning?.PrintMsg(LogClass.Gpu, "Attempted to clear invalid depth stencil!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_helperShader.ClearDepthStencil(depthValue, depthMask, stencilValue, stencilMask, depthStencil.Width, depthStencil.Height);
|
_helperShader.ClearDepthStencil(depthValue, depthMask, stencilValue, stencilMask, depthStencil.Width, depthStencil.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue