Fix r300 VBO support build on big endian.
authorMichel Dänzer <daenzer@vmware.com>
Fri, 21 Aug 2009 23:24:39 +0000 (01:24 +0200)
committerMichel Dänzer <daenzer@vmware.com>
Fri, 21 Aug 2009 23:24:39 +0000 (01:24 +0200)
src/mesa/drivers/dri/r300/r300_draw.c

index dbf5384d558eb5ecc3f5e583462cfff61cc728b8..e98dc335183fd5fe3d17a6d57b22b9a77a690f8a 100644 (file)
@@ -108,11 +108,11 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
 
 #if MESA_BIG_ENDIAN
        } else { /* if (mesa_ind_buf->type == GL_UNSIGNED_SHORT) */
-               GLuint size;
                GLushort *in = (GLushort *)src_ptr;
-               size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1);
+               GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1);
 
-               radeonAllocDmaRegion(&r300->radeon, &r300->ind_buf.bo, &r300->ind_buf.bo_offet, size, 4);
+               radeonAllocDmaRegion(&r300->radeon, &r300->ind_buf.bo,
+                                    &r300->ind_buf.bo_offset, size, 4);
 
                assert(r300->ind_buf.bo->ptr != NULL);
                out = (GLuint *)ADD_POINTERS(r300->ind_buf.bo->ptr, r300->ind_buf.bo_offset);