MultiDrawIndirect plus Primitive restart

Hello.
I have a 3d scene with thousands of drawcalls with a lot of textures, and about 100 primitive restart indices. I decided to use a MultiDrawIndirect. I solved almost all problems exept primitive restart. It doesn’t work with MultiDrawIndirect.
I draw scene using single one draw call:

glMultiDrawElementsIndirect(GL_TRIANGLES, GL_UNSIGNED_INT, NULL, numObjects, 0);

What is the most efficient way to replace a primitive restart?

Thank you.

I solved almost all problems exept primitive restart. It doesn’t work with MultiDrawIndirect.

Yes, it does. It may not work for you due to some problem, but there’s nothing in the spec that says it won’t work.

Thank you for the tip.

Problem was with this line:
glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
it works with
glDrawElementsBaseVertex(…)
but it doesn’t work with MultiDrawIndirect
I change to glEnable(GL_PRIMITIVE_RESTART); and it works.

You should report that as a driver bug.