Hello - I have two questions from Chapter 15 of the book. In the part of the chapter that teaches us how to encode draw commands on the GPU the compute shader has the following:
cmd.draw_indexed_primitives( primitive type::triangle . . . model.indexBuffer + drawArguments.indexStart . . .
Why do we add
drawArugments.indexStart? If I understand correctly, the buffer on
model is the same as the index buffer on
submesh.indexBuffer.buffer that would be called in a render pass on the CPU and
indexStart is the offset from the index buffer. Would this not cause the GPU to skip the data in the index buffer by the offset?
I am also wondering if anyone else has issues with GPU frame capture in this chapter. I get a message that says Unexpected Replayer Termination with an error code of 512. Frame capture works fine with other projects in the book. Is frame capture incompatible with indirect command buffers?
Incidentally, I can export the frame capture and replay it, but I cannot see the contents of the buffers. They all say “resource not available”.