[Mesa-dev] [PATCH 3/3] util/primconvert: take ib offset into account

Jose Fonseca jfonseca at vmware.com
Fri Dec 5 06:10:32 PST 2014


On 05/12/14 00:01, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: "10.4 10.3" <mesa-stable at lists.freedesktop.org>
> ---
>   src/gallium/auxiliary/indices/u_primconvert.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c
> index 539ca53..4632781 100644
> --- a/src/gallium/auxiliary/indices/u_primconvert.c
> +++ b/src/gallium/auxiliary/indices/u_primconvert.c
> @@ -137,7 +137,7 @@ 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);
> +                               PIPE_TRANSFER_READ, &src_transfer) + ib->offset;
>         }
>      }
>      else {
>

This change made MSVC unhappy due to the void pointer arithmetic, which 
is trivial to fix, but it made be notice something: shouldn't the 
ib->offset also be added when src == ib->user_buffer?

Jose


More information about the mesa-dev mailing list