glDrawArrays() borrows VERY small amounts of memory
Intel Xe graphics (TGL GT2) with an old problem. I just downloaded Mesa 22.2.0-devel from Oibaf to be sure it remains.
Calls to glDrawArrays(GL_QUADS, 0, 4) commonly borrow 48 bytes or 640 bytes from the OS, the numbers vary. It seems to me that this must impact the performance of the driver. But worse, it messes up things when one is tracking down a memory leak in an application.
I did a little test. Allocating and freeing 640 bytes, with my small CPU, takes approximately the same amount of time as a call to glDrawArrays() takes to push the graphics instruction(s) into the GPU pipeline.
I was musing the other day about these small allocations and wondered why the driver doesn't use alloca() or it's own pool of managed memory...
Edited by Clive McCarthy