Indirect Command Buffer Errors

Ok, I have checked through the sample project for BasicIndirectCommandBuffers and I am trying to see if the code works on my own project. The differences are that I am using offscreen render surface, index buffers, multiple render targets, "Vertex vert [[ stage_in ]]" syntax, and texture inputs. I have also removed the texture inputs temporarily.
However, after many attempts, I am still getting such errors:
Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5)
Before I try adding indirect command buffers, my project works well without them. There were no such errors.
Additionally, I am also using multi-core to do buffer updates. I noticed that some frames did not have such errors too, which leads me to believe that the indirect command buffer did not know if the vertex & index buffers have completed their updates and are ready for use.
How do I go about resolving this issue?
Thanks!

Replies

ok I have gotten the solution to work, with no more IOAF errors.
Some things I have learnt:
1) The pipeline state is inherited.
2) The render command buffers have to be reset.
3) The order of the vertex buffers being set is important, so I had to cache the previous data.
4) The was double buffering involved, so there is a need to ensure the correct vertex buffer resource is being used.
5) The execution of the indirect commands have to be only for those resources that are valid and have been correctly set.
6) The resource bindings and draw commands have to be dynamically determined at runtime if there are changes to the list of geometry objects.
Now, to check whats up with the texture inputs, as there does not seem to be any way to bind them directly.