Mesa (master): i965: Reuse precalculated ib_type_size value.

Eric Anholt anholt at kemper.freedesktop.org
Fri Jan 25 18:25:35 UTC 2013


Module: Mesa
Branch: master
Commit: b859a12f217042544450083d36b55f8391ca2909
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b859a12f217042544450083d36b55f8391ca2909

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 22 17:38:37 2013 -0800

i965: Reuse precalculated ib_type_size value.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_draw_upload.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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,




More information about the mesa-commit mailing list