i965: Reuse precalculated ib_type_size value.
authorEric Anholt <eric@anholt.net>
Wed, 23 Jan 2013 01:38:37 +0000 (17:38 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 25 Jan 2013 17:40:44 +0000 (09:40 -0800)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw_upload.c

index 43848f7dcbc1dd2a8832fda749046460f83adbc1..07751487c0d89c0d97f1dcb99ca0cb6e12cb5958 100644 (file)
@@ -840,7 +840,7 @@ static void brw_upload_indices(struct brw_context *brw)
       /* If the index buffer isn't aligned to its element size, we have to
        * rebase it into a temporary.
        */
-       if ((get_size(index_buffer->type) - 1) & offset) {
+       if ((ib_type_size - 1) & offset) {
            GLubyte *map = ctx->Driver.MapBufferRange(ctx,
                                                     offset,
                                                     ib_size,