diff options
author | Eric Anholt <eric@anholt.net> | 2009-08-11 12:31:01 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-08-12 11:28:34 -0700 |
commit | 2708ddfb06a36d8568e2aa130bf1f7d551fcd309 (patch) | |
tree | f70549bf497750fc2f865d846069d504852bc014 /src/mesa/state_tracker/st_draw.h | |
parent | ef3ad412c746203727324edbd4cbe04079332d7c (diff) |
vbo: Avoid extra validation of DrawElements.
This saves mapping the index buffer to get a bounds on the indices that
drivers just drop on the floor in the VBO case (cache win), saves a bonus
walk of the indices in the CheckArrayBounds case, and other miscellaneous
validation. On intel it's a particularly a large win (50-100% in my app)
because even though we let the indices stay in both CPU and GPU caches, we
still end up waiting for the GPU to be done with the buffer before reading
from it.
Drivers that want the min/max_index fields must now check index_bounds_valid
and use vbo_get_minmax_index before using them.
Diffstat (limited to 'src/mesa/state_tracker/st_draw.h')
-rw-r--r-- | src/mesa/state_tracker/st_draw.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h index dcfe7e15361..3e0face656b 100644 --- a/src/mesa/state_tracker/st_draw.h +++ b/src/mesa/state_tracker/st_draw.h @@ -47,6 +47,7 @@ st_draw_vbo(GLcontext *ctx, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, GLuint min_index, GLuint max_index); @@ -56,6 +57,7 @@ st_feedback_draw_vbo(GLcontext *ctx, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, GLuint min_index, GLuint max_index); |