不开启验证层 rt 非 gpuonly 不报错

This commit is contained in:
connan 2024-12-20 14:30:26 +08:00
parent 76d3c669f2
commit a5d0976a8a
2 changed files with 4 additions and 5 deletions

View File

@ -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()
}
}

View File

@ -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);