gpu capture fails wehn using performance shader

Hello,
I have been working on a metal project recently, in which I am using metal performance shader.

Here is my problem: every time I try use GPU frame capture as long as I am using functions in MPS framework, the GPU frame capture fails.


If I don't use functions in MPS framework, the GPU frame capture works fine. The error only shows that a property "_descriptor" of command buffer is null.

Below is how I use MPS framework, is it my implementation wrong or gpu frame capture simply broke when using mps ?

let commandBuffer = commandQueue.makeCommandBuffer()
           
           
            let renderPassDescriptor = MTLRenderPassDescriptor()
            renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColor(red: 0.0, green:0.0 , blue: 0.0, alpha: 0.0)
            renderPassDescriptor.colorAttachments[0].texture = pointTxt
            renderPassDescriptor.colorAttachments[0].loadAction = .clear
            renderPassDescriptor.colorAttachments[0].storeAction = .store

            let renderEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor)
            renderEncoder.pushDebugGroup("render points")
            renderEncoder.label = "points"
            renderEncoder.setRenderPipelineState(pipelineState)
            renderEncoder.setVertexBuffer(vertexBuffer, offset: 0, at: 0)
            renderEncoder.setVertexBuffer(uniformBuffer, offset: 0, at: 1)
            renderEncoder.drawPrimitives(type: .point, vertexStart: 0, vertexCount: particleCount, instanceCount: 1)
            renderEncoder.popDebugGroup()
            renderEncoder.endEncoding()
           
            let kernel = MPSImageGaussianBlur(device: device, sigma: 10.0)
           
            kernel.encode(commandBuffer: commandBuffer, sourceTexture: pointTxt, destinationTexture: blurTxt)
           
            commandBuffer.commit()


I will be extremely to any advice and commnent. Thank you!

Replies

Are you using Sierra? If so then you are SOL. I filed a bug report on this and Apple said they have no intention of fixing the bug -- when it was working fine a few weeks ago! They broke it, now won't fix it.

I have the same issue, it is not working for Xcode 9.2 and neither with Xcode 9.3 beta.

Are you on Sierra or High Sierra? I can't believe they aren't supporting Sierra within two years of its release.