测试 unity CurrentCommandBuffer
This commit is contained in:
parent
a8e24d20c8
commit
4da512dc3f
@ -133,10 +133,10 @@ void RenderAPI_Metal::spatialUpScale(void* data)
|
|||||||
// mfx_spatial_scaler.inputContentHeight = [srctex height];
|
// mfx_spatial_scaler.inputContentHeight = [srctex height];
|
||||||
// if(!cmd)
|
// if(!cmd)
|
||||||
// {
|
// {
|
||||||
id <MTLCommandBuffer> upscaleCommandBuffer = [commandQueue commandBuffer];
|
// id <MTLCommandBuffer> upscaleCommandBuffer = [commandQueue commandBuffer];
|
||||||
upscaleCommandBuffer.label = @"Upscale Command Buffer";
|
// upscaleCommandBuffer.label = @"Upscale Command Buffer";
|
||||||
[mfx_spatial_scaler encodeToCommandBuffer:upscaleCommandBuffer];
|
// [mfx_spatial_scaler encodeToCommandBuffer:upscaleCommandBuffer];
|
||||||
[upscaleCommandBuffer commit];
|
// [upscaleCommandBuffer commit];
|
||||||
|
|
||||||
// id <MTLCommandBuffer> textureCommandBuffer = [commandQueue commandBuffer];
|
// id <MTLCommandBuffer> textureCommandBuffer = [commandQueue commandBuffer];
|
||||||
// id <MTLBlitCommandEncoder> _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder];
|
// id <MTLBlitCommandEncoder> _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder];
|
||||||
@ -147,9 +147,10 @@ void RenderAPI_Metal::spatialUpScale(void* data)
|
|||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
{
|
{
|
||||||
// [mfx_spatial_scaler encodeToCommandBuffer:cmd];
|
[mfx_spatial_scaler encodeToCommandBuffer:cmd];
|
||||||
// [cmd commit];
|
// [cmd commit]; 后处理用 unity CurrentCommandBuffer 不能 提交,不自定义 Encoder 不用 metal_graphics->EndCurrentCommandEncoder();
|
||||||
|
|
||||||
|
// 不开启验证层 貌似不用保证 outputTexture 是 gpuonly的
|
||||||
// id <MTLCommandBuffer> textureCommandBuffer = [commandQueue commandBuffer];
|
// id <MTLCommandBuffer> textureCommandBuffer = [commandQueue commandBuffer];
|
||||||
// id <MTLBlitCommandEncoder> _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder];
|
// id <MTLBlitCommandEncoder> _mfxSpatialEncoder =[textureCommandBuffer blitCommandEncoder];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user