projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c4806c
)
[965] Clarify a bit of index buffer upload code.
author
Eric Anholt
<eric@anholt.net>
Wed, 9 Jan 2008 00:20:28 +0000
(16:20 -0800)
committer
Eric Anholt
<eric@anholt.net>
Wed, 9 Jan 2008 22:41:38 +0000
(14:41 -0800)
src/mesa/drivers/dri/i965/brw_draw_upload.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_draw_upload.c
b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index b0042a5449d42955cd8a52606771105e0a163ae0..8c4e1bd569011b2f87d653404f661a135409af24 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/
src/mesa/drivers/dri/i965/brw_draw_upload.c
@@
-583,7
+583,10
@@
void brw_upload_indices( struct brw_context *brw,
index_buffer->ptr,
bufferobj);
} else {
- if (((1 << get_index_type(index_buffer->type)) - 1) & offset) {
+ /* 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) {
struct gl_buffer_object *vbo;
GLuint voffset;
GLubyte *map = ctx->Driver.MapBuffer(ctx,