The below post from last year might give you some ideas.
Also, you might verify that you’re populating and binding the GL_DRAW_INDIRECT_BUFFER properly, providing the correct drawCount to the draw call, and of course checking for GL errors.
Failing that, consider rolling your own gl_DrawID. For suggestions, see:
- Approaching zero driver overhead - 3/2014, Slides 31-33. They suggest a few
gl_DrawIDalternatives. - 17/11/2012 - Surviving without gl_DrawID