Khronos recently released the OpenGL 4.6 spec which incorporates the ARB_indirect_parameters extension.
While it's rather obvious how to use the new functions (f.e. glMultiDrawElementsCount) it is not clear how one can fill the parameter buffer in a shader as glBindBufferBase doesn't accept the GL_PARAMETER_BUFFER enum (according to the spec.).

So my questions are:
  • how do I write this buffer from a shader
  • how do I write this buffer with transform feedback