There's some weird text I'd never noticed in the VBO spec suggesting that we don't need to deal with misaligned data within buffers at all, but I imagine apps all over the place would fail if we started relying on that text. Just warn the developer when they stumble over this. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 29ec9bb..07f9f00 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -808,6 +808,9 @@ static void brw_upload_indices(struct brw_context *brw) * rebase it into a temporary. */ if ((ib_type_size - 1) & offset) { + perf_debug("copying index buffer to a temporary to work around " + "misaligned offset %d\n", offset); + GLubyte *map = ctx->Driver.MapBufferRange(ctx, offset, ib_size, -- 1.7.10.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev