[Mesa-dev] [PATCH 3/3] util/primconvert: take ib offset into account
Ilia Mirkin
imirkin at alum.mit.edu
Fri Dec 5 06:12:51 PST 2014
On Fri, Dec 5, 2014 at 9:10 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> 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?
I grepped around for user_buffer usage and it does not seem like
anything else applies ib->offset to it either. Perhaps I missed it
though. I'm a little weak on the exact gallium interface meanings, so
perhaps it _is_ supposed to be added?
Sorry about the MSVC breakage, I even thought about the void ptr
arithmetic, but discounted it as "well, nobody builds freedreno or vc4
on windows". But of course you still end up building primconvert :)
-ilia
More information about the mesa-dev
mailing list