I am getting the following error when running the introductory Accelerated Ray Tracing project ( rewritten in Swift by Marius Horga ):
validateComputeFunctionArguments:831: failed assertion `Compute Function(shadowKernel): Shader uses texture(dstTex[0]) as read-write, but hardware does not support read-write texture of this pixel format.'
The MTLTextureDescriptor is set up as:
let renderTargetDescriptor = MTLTextureDescriptor()
renderTargetDescriptor.pixelFormat = .rgba32Float
renderTargetDescriptor.textureType = .type2D
renderTargetDescriptor.width = Int(size.width)
renderTargetDescriptor.height = Int(size.height)
renderTargetDescriptor.storageMode = .private
renderTargetDescriptor.usage = [.shaderRead, .shaderWrite]
renderTarget = device.makeTexture(descriptor: renderTargetDescriptor)
I am running the project with XCode 11 - Beta 3 on Catalina Beta 3. Apple's Objective C project works fine and the Swift rewrite works fine on Mojave / XCode 10.
Also, the Animated Ray Tracing example ( Objective C ) from this year's WWDC works ( obviously ).
This may be a bug that will be sorted out as the fall approaches, but if I am missing something, please let me know. There are no obvious work arounds for making the textures usable.
Thanks very much,
John Lobe