summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-05-03 19:00:07 -0600
committerBrian Paul <[email protected]>2013-05-03 19:00:07 -0600
commit4ea05bcba66cb0d49cbad20158b41864a20a73b9 (patch)
treede6816913b5064297fbd591253f61aa2da4cf8c7 /src/egl
parent3702d2508249bb264ab502c0093dbbc10b0b02fa (diff)
vbo: implement primitive merging for glBegin/End sequences
A surprising number of apps and benchmarks have poor code like this: glBegin(GL_LINE_STRIP); glVertex(v1); glVertex(v2); glEnd(); // Possibly some no-op state changes here glBegin(GL_LINE_STRIP); glVertex(v3); glVertex(v4); glEnd(); // repeat many, many times. The above sequence can be converted into: glBegin(GL_LINES); glVertex(v1); glVertex(v2); glVertex(v3); glVertex(v4); glEnd(); Similarly for GL_POINTS, GL_TRIANGLES, etc. Merging was already implemented for GL_QUADS in the display list code. Now other prim types are handled and it's also done for immediate mode. In one case: before after ----------------------------------------------- number of st_draw_vbo() calls: 141 45 number of _mesa_prims issued: 7520 632 Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/egl')
0 files changed, 0 insertions, 0 deletions