Group Group Group Group Group Group Group Group Group

frameBufferOnly texture not supported for compute

In chapter 14 I get an error here:

computeEncoder.setTexture(drawable.texture, index: 0)

The error is:

SIGABRT and -[MTLDebugComputeCommandEncoder setTexture:atIndex:]:362: failed assertion `frameBufferOnly texture not supported for compute.’

My device is not that old - an iPad Pro, 2nd gen.

I’m probably going to try creating a texture, doing the work there, and then copying that to drawable.texture.

Are you setting the MTKView’s frameBufferOnly to false?

P. 425

metalView.framebufferOnly = false

This is set to true by default to be more efficient down the pipeline.

No I wasn’t. Sorry, I was pasting from the book, but I should start with the example code instead. Thank you!

Rob