assertion failure trying to create MTLFXTemporalScaler

I'm trying to create a MTLFXTemporalScaler as follows (this is adapted from the sample code):

func updateTemporalScaler() {
        let desc = MTLFXTemporalScalerDescriptor()
        desc.inputWidth = renderTarget.renderSize.width
        desc.inputHeight = renderTarget.renderSize.height
        desc.outputWidth = renderTarget.windowSize.width
        desc.outputHeight = renderTarget.windowSize.height
        desc.colorTextureFormat = .bgra8Unorm
        desc.depthTextureFormat = .depth32Float
        desc.motionTextureFormat = .rg16Float
        desc.outputTextureFormat = .bgra8Unorm

        guard let temporalScaler = desc.makeTemporalScaler(device: device) else {
            fatalError("The temporal scaler effect is not usable!")
        }

        temporalScaler.motionVectorScaleX = Float(renderTarget.renderSize.width)
        temporalScaler.motionVectorScaleY = Float(renderTarget.renderSize.height)
        mfxTemporalScaler = temporalScaler
    }

I'm getting the following error the 3rd time the code is called:

/AppleInternal/Library/BuildRoots/91a344b1-f985-11ee-b563-fe8bc7981bff/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/RegionOps/ANRegion.mm:855: failed assertion `ANE intermediate buffer handle not same!'

When I copy the code out to a playground, it succeeds when called with the same sequence of descriptors. Does this seem like a bug with MTLFXTemporalScaler?

assertion failure trying to create MTLFXTemporalScaler
 
 
Q