Hi,
I'm experiencing something I can't explain with the Metal debugger, on Xcode 15 Beta 2.
I have 2 render passes that should accomplish the same thing from different approaches, which I use alternately for testing:
Render Pass A (purple cubes) does direct instanced drawIndexedPrimitives calls from the CPU.
Render Pass B (green cubes) uses an indirect command buffer and instanced drawIndexedPrimitives calls from the GPU.
Render Pass A draws geometry exactly as expected in the application window. But when I use the Metal debugger, the command buffer step preview shows nothing, and debugging the geometry of a particular draw call shows some values to be null that cannot possibly be, as the rendered images are exactly as expected.
Render Pass B draws nothing in the application window. But when I use the Metal debugger, the command buffer step preview shows exactly the expected image! And even the expected values in the geometry debugger.
The opposite nature of what I am seeing here may be a red herring. A better question may be: why does Render Pass B seem to be producing the expected geometry, but then not draw it in the running application view?
Adding to the confusion, even though the small previews show the expected geometry, the "CAMetalLayer Display Drawable" shows exactly what I get in the end result, just the Skybox.
I would highly appreciate any tips on why what appears to be OK is not making it into the final drawable. Let me know if there is any specific code that could help debug this.
This may have been posted prematurely. I found that by removing the skyboxRenderPass that was running after Render Pass B, I now see the expected geometry.
This issue doesn't occur with Render Pass A, nor in any previous experimentation I've done. Guessing it has something to do with the particularities of the indirect rendering I am doing in Render Pass B. If anyone reads this and has a clear explanation for why, I would be interested. But the issue is solved, at least practically speaking for me.