diff options
author | José Fonseca <[email protected]> | 2014-12-05 14:15:02 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-12-11 13:54:52 +0000 |
commit | be59440b53fde5637cddf68a9333ea8f1af80f77 (patch) | |
tree | 3f282e6b238a938ee6107d0ce797f1a7da43c8b5 | |
parent | ac8d596498edfcf3785c21b24abd49f71744c8a9 (diff) |
util/primconvert: Avoid point arithmetic; apply offset on all cases.
Matches what u_vbuf_get_minmax_index() does.
Reviewed-by: Ilia Mirkin <[email protected]>
(cherry picked from commit f9098f09720d9b751e8529b2648971ee7d576b37)
-rw-r--r-- | src/gallium/auxiliary/indices/u_primconvert.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 46327819006..eba1f9e4b30 100644 --- a/src/gallium/auxiliary/indices/u_primconvert.c +++ b/src/gallium/auxiliary/indices/u_primconvert.c @@ -137,8 +137,9 @@ util_primconvert_draw_vbo(struct primconvert_context *pc, src = ib->user_buffer; if (!src) { src = pipe_buffer_map(pc->pipe, ib->buffer, - PIPE_TRANSFER_READ, &src_transfer) + ib->offset; + PIPE_TRANSFER_READ, &src_transfer); } + src = (const uint8_t *)src + ib->offset; } else { u_index_generator(pc->primtypes_mask, |