diff options
author | Marek Olšák <[email protected]> | 2010-12-26 04:30:51 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-02-14 21:50:08 +0100 |
commit | 2a904fd6a0cb80eec6dec2bae07fd8778b04caf3 (patch) | |
tree | 8a959d1eb02aa38721a6bacab9441d81adafc47f /src/gallium/docs | |
parent | cdca3c58aa2d9549f5188910e2a77b438516714f (diff) |
st/mesa: set vertex arrays state only when necessary
The vertex arrays state should be set only when (_NEW_ARRAY | _NEW_PROGRAM)
is dirty. This assumes user buffer content is mutable, which will be
sorted out in the next commit. The following usage case should be much faster
now:
for (i = 0; i < 1000; i++) {
glDrawElements(...);
}
Or even:
for (i = 0; i < 1000; i++) {
glSomeStateChangeOtherThanArraysOrProgram(...);
glDrawElements(...);
}
The performance increase from this may be significant in some apps and
negligible in others. It is especially noticable in the Torcs game (r300g):
Before: 15.4 fps
After: 20 fps
Also less looping over attribs in st_draw_vbo yields slight speed-up
in apps with lots of glDraw* calls.
Diffstat (limited to 'src/gallium/docs')
0 files changed, 0 insertions, 0 deletions