Stop depth/stencil blits from crashing everything

This commit is contained in:
Isaac Marovitz 2024-06-29 22:54:28 +01:00
parent a33187f7db
commit f3feabad2e
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
2 changed files with 15 additions and 3 deletions

View File

@ -254,14 +254,23 @@ namespace Ryujinx.Graphics.Metal
_renderer.RegisterFlush();
}
public void BlitColor(
public void Blit(
ITexture src,
ITexture dst,
Extents2D srcRegion,
Extents2D dstRegion,
bool isDepthOrStencil,
bool linearFilter)
{
_renderer.HelperShader.BlitColor(Cbs, src, dst, srcRegion, dstRegion, linearFilter);
if (isDepthOrStencil)
{
// TODO: Depth & stencil blit!
Logger.Warning?.PrintMsg(LogClass.Gpu, "Requested a depth or stencil blit!");
}
else
{
_renderer.HelperShader.BlitColor(Cbs, src, dst, srcRegion, dstRegion, linearFilter);
}
}
public void Barrier()

View File

@ -162,7 +162,10 @@ namespace Ryujinx.Graphics.Metal
public void CopyTo(ITexture destination, Extents2D srcRegion, Extents2D dstRegion, bool linearFilter)
{
_pipeline.BlitColor(this, destination, srcRegion, dstRegion, linearFilter);
var dst = (Texture)destination;
bool isDepthOrStencil = dst.Info.Format.IsDepthOrStencil();
_pipeline.Blit(this, destination, srcRegion, dstRegion, isDepthOrStencil, linearFilter);
}
public void CopyTo(BufferRange range, int layer, int level, int stride)