[Mesa-users] glDrawElements much slower than glDrawArrays

Russell Strong russell at strong.id.au
Sun Dec 30 20:20:51 PST 2012


Russell Strong <russell <at> strong.id.au> writes:

> 
> Hi,
> 
> As a learning exercise I'm rendering a uv sphere with glDrawArrays using buffer
> objects, I then change this over to glDrawElements with indices 0,1,2,...n also
> in a buffer object. What I found was that the glDrawElements version was
> consuming 16% cpu compared with 4% for glDrawArrays.
> 
> I've looked around and can't seem to find any reason why it would be slower. 
> Both "should" be storing everything in the gpu's ram as far as I can see, but I
> suspect the draw elements version is not.
> 
> I'm using an older version of mesa 7.11.2 ( Fedora 16 ) intel driver, anyone
> remember any problems with glDrawElements then?
> 


I've upgraded to a more recent version of mesa 8.0.4 ( fedora 17 ).  The problem
has gone away and I now see a negligible difference between glDrawArrays and
glDrawElements when looking at it with intel_gpu_time 






More information about the mesa-users mailing list