diff --git a/NativeRenderPlugin/RenderAPI_Metal.mm b/NativeRenderPlugin/RenderAPI_Metal.mm index e8d4acf..629e250 100644 --- a/NativeRenderPlugin/RenderAPI_Metal.mm +++ b/NativeRenderPlugin/RenderAPI_Metal.mm @@ -133,10 +133,10 @@ void RenderAPI_Metal::spatialUpScale(void* data) // mfx_spatial_scaler.inputContentHeight = [srctex height]; // if(!cmd) // { - id upscaleCommandBuffer = [commandQueue commandBuffer]; - upscaleCommandBuffer.label = @"Upscale Command Buffer"; - [mfx_spatial_scaler encodeToCommandBuffer:upscaleCommandBuffer]; - [upscaleCommandBuffer commit]; + // id upscaleCommandBuffer = [commandQueue commandBuffer]; + // upscaleCommandBuffer.label = @"Upscale Command Buffer"; + // [mfx_spatial_scaler encodeToCommandBuffer:upscaleCommandBuffer]; + // [upscaleCommandBuffer commit]; // id textureCommandBuffer = [commandQueue commandBuffer]; // id _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder]; @@ -147,9 +147,10 @@ void RenderAPI_Metal::spatialUpScale(void* data) // } // else { - // [mfx_spatial_scaler encodeToCommandBuffer:cmd]; - // [cmd commit]; + [mfx_spatial_scaler encodeToCommandBuffer:cmd]; + // [cmd commit]; 后处理用 unity CurrentCommandBuffer 不能 提交,不自定义 Encoder 不用 metal_graphics->EndCurrentCommandEncoder(); + // 不开启验证层 貌似不用保证 outputTexture 是 gpuonly的 // id textureCommandBuffer = [commandQueue commandBuffer]; // id _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder];