Actually, those call are inserted by RenderDoc. Here the response from RenderDoc creator:
GLES has a legacy feature which allows you to specify vertex attribute
pointers in CPU memory without using a vertex buffer at all
(same with indices without an index buffer)
renderdoc emulates that by checking when the drawcall happens if any such
pointers exist, and quickly stuffing the data into a buffer, binding that
buffer, and then restoring the state after the draw. That way most of the
code only has to deal with vertex buffer handling from this century and not
worry about CPU pointers
most of the heavy lifting is skipped if you use a VAO because CPU pointers can't
be used with a VAO, but if you're not using one then it has to do the slower
path of checking each attribute. In your case you're not using a VAO so it goes
down the slow path, but then each attribute is using a vertex buffer so it never > actually has to do any emulation
it still ends up doing a couple of redundant bind calls when it's "cleaning up" > even if there's nothing to clean up
for
loop withglDrawElements
only. For me it sounds like a bug in intel driver (mesa 19.2). \$\endgroup\$vogl
doesn't show additionalglBindBuffer
. \$\endgroup\$