mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-09 20:49:05 +00:00
Gpu: exclude RGBA16Float texture format for fast DMA copy on Apple silicon.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using Ryujinx.Graphics.Device;
|
using Ryujinx.Graphics.Device;
|
||||||
|
using Ryujinx.Graphics.GAL;
|
||||||
using Ryujinx.Graphics.Gpu.Engine.Threed;
|
using Ryujinx.Graphics.Gpu.Engine.Threed;
|
||||||
using Ryujinx.Graphics.Gpu.Memory;
|
using Ryujinx.Graphics.Gpu.Memory;
|
||||||
using Ryujinx.Graphics.Texture;
|
using Ryujinx.Graphics.Texture;
|
||||||
@@ -306,6 +307,13 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
src.MemoryLayout.UnpackGobBlocksInZ());
|
src.MemoryLayout.UnpackGobBlocksInZ());
|
||||||
|
|
||||||
if (source != null && source.Height == yCount)
|
if (source != null && source.Height == yCount)
|
||||||
|
{
|
||||||
|
// HACK: Exclude RGBA16Float texture format for fast DMA copy on Apple silicon.
|
||||||
|
// Fixes Sonic Frontiers when VK_EXT_external_memory_host is not available.
|
||||||
|
bool skipDma = _context.Capabilities.VendorName == "Apple" &&
|
||||||
|
source.Info.FormatInfo.Format == Format.R16G16B16A16Float;
|
||||||
|
|
||||||
|
if (!skipDma)
|
||||||
{
|
{
|
||||||
source.SynchronizeMemory();
|
source.SynchronizeMemory();
|
||||||
|
|
||||||
@@ -330,6 +338,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ReadOnlySpan<byte> srcSpan = memoryManager.GetSpan(srcGpuVa + (ulong)srcBaseOffset, srcSize, true);
|
ReadOnlySpan<byte> srcSpan = memoryManager.GetSpan(srcGpuVa + (ulong)srcBaseOffset, srcSize, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user