Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread Kyriazis, George
eedesktop.org > Subject: Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero > indices > > Here's the current code: > > for (UINT i = 0; i < ctx->num_vertex_buffers; i++) { > uint32_t size, pitch, elems, partial_inbounds; > const

Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread Ilia Mirkin
copy the appropriate vertex and index buffers, which > is the case that this fixes). What do you think? > > Thanks, > > George > >> -Original Message- >> From: ibmir...@gmail.com [mailto:ibmir...@gmail.com] On Behalf Of Ilia >> Mirkin >> Sent:

Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread Kyriazis, George
orge > Cc: mesa-dev@lists.freedesktop.org > Subject: Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero > indices > > What's the problem being fixed exactly? We're passing what is effectively > the zero index to the core, and the core shouldn't ever access data outside of

Re: [Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread Ilia Mirkin
What's the problem being fixed exactly? We're passing what is effectively the zero index to the core, and the core shouldn't ever access data outside of [min, max] + bias. That said, what you have is probably a cleaner implementation. However I'm a bit concerned about how it will function with VBO

[Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread George Kyriazis
Fix issue with index buffers that do not contain 0 index. Use core BaseVertex functionality to offset index buffer indices, instead of offsetting vertex buffer to point before the buffer origin. --- src/gallium/drivers/swr/swr_draw.cpp | 2 +- src/gallium/drivers/swr/swr_state.cpp | 2 +- 2 file