From a5d0976a8a05561444f84e63c584cc4c6f94f6d5 Mon Sep 17 00:00:00 2001 From: connan Date: Fri, 20 Dec 2024 14:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=BC=80=E5=90=AF=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=B1=82=20rt=20=E9=9D=9E=20gpuonly=20=E4=B8=8D=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Plugins/Mac/MetalFX.swift | 8 ++++---- .../Runtime/SuperRendering/SR/Scripts/MetalFx.cs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Assets/Plugins/Mac/MetalFX.swift b/Assets/Plugins/Mac/MetalFX.swift index 048289e..e5b996e 100644 --- a/Assets/Plugins/Mac/MetalFX.swift +++ b/Assets/Plugins/Mac/MetalFX.swift @@ -45,11 +45,11 @@ final class MTLHelper { } spatialScaler.colorTexture = srcTexture - spatialScaler.outputTexture = currentFrameUpscaledColor + spatialScaler.outputTexture = dstTexture spatialScaler.encode(commandBuffer: commandBuffer) - let blitEncoder = commandBuffer.makeBlitCommandEncoder(); - blitEncoder?.copy(from: currentFrameUpscaledColor, to: dstTexture) - blitEncoder?.endEncoding() + //let blitEncoder = commandBuffer.makeBlitCommandEncoder(); + //blitEncoder?.copy(from: currentFrameUpscaledColor, to: dstTexture) + //blitEncoder?.endEncoding() commandBuffer.commit() } } diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/MetalFx.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/MetalFx.cs index 166db1c..96e37c3 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/MetalFx.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/MetalFx.cs @@ -72,7 +72,6 @@ namespace X.Rendering.Feature [DllImport("__Internal", EntryPoint = "callMetalFX_SpatialScaling")] static extern void CallNativeMethod(IntPtr srcTexture, IntPtr dstTexture); // cmd.SetRenderTarget(destination, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); - // ネイティブ側にてscalingした結果を`dst`に書き込む CallNativeMethod(source.rt.GetNativeTexturePtr(), destination.rt.GetNativeTexturePtr()); //cmd.Blit(dstRT, destination); //cmd.IssuePluginEventAndData(RenderingPlugin.GetRenderEventAndDataFunc(), (int)RenderingPlugin.NativeRenderingEvent.SpatialUpScale, dataPtr);