vrr
This commit is contained in:
parent
af699b5c7e
commit
c2e1fd6197
@ -30,6 +30,7 @@ public:
|
||||
virtual void spatialUpScale(void*data);
|
||||
private:
|
||||
id <MTLFXSpatialScaler> mfx_spatial_scaler;
|
||||
id <MTLCommandQueue> commandQueue;
|
||||
IUnityGraphicsMetal* metal_graphics;
|
||||
};
|
||||
|
||||
@ -97,19 +98,20 @@ void RenderAPI_Metal::spatialUpScale(void* data)
|
||||
desc.colorProcessingMode = MTLFXSpatialScalerColorProcessingModeLinear;
|
||||
|
||||
mfx_spatial_scaler = [desc newSpatialScalerWithDevice:_device];
|
||||
if (mfx_spatial_scaler == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
commandQueue = [_device newCommandQueue];
|
||||
}
|
||||
|
||||
if (mfx_spatial_scaler == nil || commandQueue == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mfx_spatial_scaler.colorTexture = srctex;
|
||||
mfx_spatial_scaler.outputTexture = dsttex;
|
||||
// if(!cmd)
|
||||
{
|
||||
id <MTLCommandQueue> _commandQueue = [_device newCommandQueue];
|
||||
id <MTLCommandBuffer> upscaleCommandBuffer = [_commandQueue commandBuffer];
|
||||
id <MTLCommandBuffer> upscaleCommandBuffer = [commandQueue commandBuffer];
|
||||
upscaleCommandBuffer.label = @"Upscale Command Buffer";
|
||||
|
||||
[mfx_spatial_scaler encodeToCommandBuffer:upscaleCommandBuffer];
|
||||
[upscaleCommandBuffer commit];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user