diff --git a/src/Ryujinx.Graphics.GAL/Capabilities.cs b/src/Ryujinx.Graphics.GAL/Capabilities.cs index c94abef89..4271c3d18 100644 --- a/src/Ryujinx.Graphics.GAL/Capabilities.cs +++ b/src/Ryujinx.Graphics.GAL/Capabilities.cs @@ -27,7 +27,6 @@ namespace Ryujinx.Graphics.GAL public readonly bool SupportsSparseBuffer; public readonly bool Supports5BitComponentFormat; public readonly bool SupportsBlendEquationAdvanced; - public readonly bool SupportsFastDmaTextureCopy; public readonly bool SupportsFragmentShaderInterlock; public readonly bool SupportsFragmentShaderOrderingIntel; public readonly bool SupportsGeometryShader; @@ -97,7 +96,6 @@ namespace Ryujinx.Graphics.GAL bool supports5BitComponentFormat, bool supportsSparseBuffer, bool supportsBlendEquationAdvanced, - bool supportsFastDmaTextureCopy, bool supportsFragmentShaderInterlock, bool supportsFragmentShaderOrderingIntel, bool supportsGeometryShader, @@ -161,7 +159,6 @@ namespace Ryujinx.Graphics.GAL Supports5BitComponentFormat = supports5BitComponentFormat; SupportsSparseBuffer = supportsSparseBuffer; SupportsBlendEquationAdvanced = supportsBlendEquationAdvanced; - SupportsFastDmaTextureCopy = supportsFastDmaTextureCopy; SupportsFragmentShaderInterlock = supportsFragmentShaderInterlock; SupportsFragmentShaderOrderingIntel = supportsFragmentShaderOrderingIntel; SupportsGeometryShader = supportsGeometryShader; diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs b/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs index 8858709eb..cdeae0040 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs @@ -1,7 +1,6 @@ using Ryujinx.Common; using Ryujinx.Common.Memory; using Ryujinx.Graphics.Device; -using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Gpu.Engine.Threed; using Ryujinx.Graphics.Gpu.Memory; using Ryujinx.Graphics.Texture; @@ -288,9 +287,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma bool completeSource = IsTextureCopyComplete(src, srcLinear, srcBpp, srcStride, xCount, yCount); bool completeDest = IsTextureCopyComplete(dst, dstLinear, dstBpp, dstStride, xCount, yCount); - // Check if the source texture exists on the GPU, if it does, do a GPU-side copy. + // Check if the source texture exists on the GPU, if it does, do a GPU side copy. // Otherwise, we would need to flush the source texture which is costly. - // We don't expect the source to be linear in such cases, as linear source usually indicates buffer or CPU-written data. + // We don't expect the source to be linear in such cases, as linear source usually indicates buffer or CPU written data. if (completeSource && completeDest && !srcLinear && isIdentityRemap) { @@ -308,35 +307,27 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma 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.SupportsFastDmaTextureCopy && - source.Info.FormatInfo.Format == Format.R16G16B16A16Float; + source.SynchronizeMemory(); - if (!skipDma) + var target = memoryManager.Physical.TextureCache.FindOrCreateTexture( + memoryManager, + source.Info.FormatInfo, + dstGpuVa, + xCount, + yCount, + dstStride, + dstLinear, + dst.MemoryLayout.UnpackGobBlocksInY(), + dst.MemoryLayout.UnpackGobBlocksInZ()); + + if (source.ScaleFactor != target.ScaleFactor) { - source.SynchronizeMemory(); - - var target = memoryManager.Physical.TextureCache.FindOrCreateTexture( - memoryManager, - source.Info.FormatInfo, - dstGpuVa, - xCount, - yCount, - dstStride, - dstLinear, - dst.MemoryLayout.UnpackGobBlocksInY(), - dst.MemoryLayout.UnpackGobBlocksInZ()); - - if (source.ScaleFactor != target.ScaleFactor) - { - target.PropagateScale(source); - } - - source.HostTexture.CopyTo(target.HostTexture, 0, 0); - target.SignalModified(); - return; + target.PropagateScale(source); } + + source.HostTexture.CopyTo(target.HostTexture, 0, 0); + target.SignalModified(); + return; } } diff --git a/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs b/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs index b294c54b9..331776122 100644 --- a/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs +++ b/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs @@ -168,7 +168,6 @@ namespace Ryujinx.Graphics.OpenGL supports5BitComponentFormat: true, supportsSparseBuffer: false, supportsBlendEquationAdvanced: HwCapabilities.SupportsBlendEquationAdvanced, - supportsFastDmaTextureCopy: true, supportsFragmentShaderInterlock: HwCapabilities.SupportsFragmentShaderInterlock, supportsFragmentShaderOrderingIntel: HwCapabilities.SupportsFragmentShaderOrdering, supportsGeometryShader: true, diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index ef394d35d..4b38fc29b 100644 --- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -758,7 +758,6 @@ namespace Ryujinx.Graphics.Vulkan supports5BitComponentFormat: supports5BitComponentFormat, supportsSparseBuffer: features2.Features.SparseBinding && mainQueueProperties.QueueFlags.HasFlag(QueueFlags.SparseBindingBit), supportsBlendEquationAdvanced: Capabilities.SupportsBlendEquationAdvanced, - supportsFastDmaTextureCopy: !IsMoltenVk, supportsFragmentShaderInterlock: Capabilities.SupportsFragmentShaderInterlock, supportsFragmentShaderOrderingIntel: false, supportsGeometryShader: Capabilities.SupportsGeometryShader,