Mesa (gallium-0.1): mesa: Don't call get_minmax_index on VBOs.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Aug 14 12:55:33 UTC 2009


Module: Mesa
Branch: gallium-0.1
Commit: 2bdb78cec183fa8f0e857ee6552108a4e466d359
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bdb78cec183fa8f0e857ee6552108a4e466d359

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Aug 10 15:12:24 2009 +0100

mesa: Don't call get_minmax_index on VBOs.

It can be very slow to do this on uncached memory. Let the driver do this
if it deems necessary.

---

 src/mesa/vbo/vbo_exec_array.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 8871e10..e1ac9e3 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -388,16 +388,8 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *ind
    }
 
    if (ctx->Array.ElementArrayBufferObj->Name) {
-      const GLvoid *map = ctx->Driver.MapBuffer(ctx,
-						 GL_ELEMENT_ARRAY_BUFFER_ARB,
-						 GL_READ_ONLY,
-						 ctx->Array.ElementArrayBufferObj);
-
-      get_minmax_index(count, type, ADD_POINTERS(map, indices), &min_index, &max_index);
-
-      ctx->Driver.UnmapBuffer(ctx,
-			      GL_ELEMENT_ARRAY_BUFFER_ARB,
-			      ctx->Array.ElementArrayBufferObj);
+      min_index = 0;
+      max_index = ~0;
    }
    else {
       get_minmax_index(count, type, indices, &min_index, &max_index);




More information about the mesa-commit mailing list