[Mesa-dev] [PATCH 4/8] i965: Reuse precalculated ib_type_size value.

Eric Anholt eric at anholt.net
Wed Jan 23 11:17:46 PST 2013


---
 src/mesa/drivers/dri/i965/brw_draw_upload.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 43848f7..0775148 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -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,
-- 
1.7.10.4



More information about the mesa-dev mailing list