On Mon, Aug 22, 2011 at 1:33 AM, Ian Romanick <[email protected]> wrote:
> From: Ian Romanick <[email protected]>
>
> ---
>  src/mesa/vbo/vbo_exec_array.c |   15 +++++++++++----
>  1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
> index 484e1a8..9e194b1 100644
> --- a/src/mesa/vbo/vbo_exec_array.c
> +++ b/src/mesa/vbo/vbo_exec_array.c
> @@ -95,10 +95,17 @@ vbo_get_minmax_index(struct gl_context *ctx,
>    GLuint i;
>
>    if (_mesa_is_bufferobj(ib->obj)) {
> -      const GLvoid *map =
> -         ctx->Driver.MapBufferRange(ctx, 0, ib->obj->Size, GL_MAP_READ_BIT,
> -                                   ib->obj);
> -      indices = ADD_POINTERS(map, ib->ptr);
> +      unsigned map_size;
> +
> +      switch (ib->type) {
> +      case GL_UNSIGNED_INT:   map_size = count * sizeof(GLuint); break;
> +      case GL_UNSIGNED_SHORT: map_size = count * sizeof(GLushort); break;
> +      case GL_UNSIGNED_BYTE:  map_size = count * sizeof(GLubyte); break;

Please reformat this to:

 case GL_UNSIGNED_INT:
    map_size = count * sizeof(GLuint);
    break;

-Brian
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to