From 1e9d3ad4e1d987e1130e4bcd2ffc35f0e18064c3 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 30 Jul 2009 10:31:57 +0200 Subject: vbo: Fix build on windows. --- src/mesa/vbo/vbo_split_inplace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/vbo/vbo_split_inplace.c') diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c index 266bc56c82..9628227e7c 100644 --- a/src/mesa/vbo/vbo_split_inplace.c +++ b/src/mesa/vbo/vbo_split_inplace.c @@ -59,11 +59,11 @@ struct split_context { static void flush_vertex( struct split_context *split ) { GLuint min_index, max_index; + GLuint i; if (!split->dstprim_nr) return; - GLuint i; min_index = split->dstprim[0].start; max_index = min_index + split->dstprim[0].count - 1; -- cgit v1.2.3 From 2708ddfb06a36d8568e2aa130bf1f7d551fcd309 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 Aug 2009 12:31:01 -0700 Subject: 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. --- src/mesa/vbo/vbo_split_inplace.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/vbo/vbo_split_inplace.c') diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c index 9628227e7c..da84eaa6ea 100644 --- a/src/mesa/vbo/vbo_split_inplace.c +++ b/src/mesa/vbo/vbo_split_inplace.c @@ -85,6 +85,7 @@ static void flush_vertex( struct split_context *split ) split->dstprim, split->dstprim_nr, NULL, + GL_TRUE, min_index, max_index); -- cgit v1.2.3