Mesa (master): Fix r300 VBO support build on big endian.

Michel Dänzer daenzer at kemper.freedesktop.org
Fri Aug 21 23:34:56 UTC 2009


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

Author: Michel Dänzer <daenzer at vmware.com>
Date:   Sat Aug 22 01:24:39 2009 +0200

Fix r300 VBO support build on big endian.

---

 src/mesa/drivers/dri/r300/r300_draw.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index dbf5384..e98dc33 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -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);




More information about the mesa-commit mailing list