Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-26 Thread Marek Olšák
On Mon, Mar 26, 2018 at 6:39 PM, Erico Nunes wrote: > Thanks all for the input. > > I don't have an in-depth knowledge of the hardware either, though as > far as we can see the hardware does expect that we pass min_index in > the command stream. max_index is used to

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-26 Thread Erico Nunes
Thanks all for the input. I don't have an in-depth knowledge of the hardware either, though as far as we can see the hardware does expect that we pass min_index in the command stream. max_index is used to calculate the sizes in other command stream fields (which is not the same as

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-24 Thread Connor Abbott
On Sat, Mar 24, 2018 at 6:00 PM, Jason Ekstrand wrote: > On Sat, Mar 24, 2018 at 2:27 PM, Marek Olšák wrote: >> >> On Sat, Mar 24, 2018 at 1:36 PM, Connor Abbott >> wrote: >>> >>> If Gallium was being lazy and not >>> specifying the

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-24 Thread Jason Ekstrand
On Sat, Mar 24, 2018 at 2:27 PM, Marek Olšák wrote: > On Sat, Mar 24, 2018 at 1:36 PM, Connor Abbott > wrote: > >> If Gallium was being lazy and not >> specifying the bounds for internal shaders, that needs to be fixed for >> the HW to work properly. >> >

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-24 Thread Marek Olšák
On Sat, Mar 24, 2018 at 5:27 PM, Marek Olšák wrote: > On Sat, Mar 24, 2018 at 1:36 PM, Connor Abbott > wrote: > >> If Gallium was being lazy and not >> specifying the bounds for internal shaders, that needs to be fixed for >> the HW to work properly. >> >

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-24 Thread Marek Olšák
On Sat, Mar 24, 2018 at 1:36 PM, Connor Abbott wrote: > If Gallium was being lazy and not > specifying the bounds for internal shaders, that needs to be fixed for > the HW to work properly. > I don't understand the sentence. Shaders don't interact with vertex indices. I

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-24 Thread Connor Abbott
My understanding is that unlike most other architectures, Mali does vertex shading on every vertex up-front, completely ignoring the index buffer. Primitive assembly and tile binning happen after every vertex is transformed. There is no cache of transformed vertices. Utgard also only supports

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-17 Thread Marek Olšák
The index bounds are computed only when they are needed for uploading vertices that are passed via a CPU pointer (user_buffer). In all other cases, computing the index bounds has a performance cost, which can be very significant. If you rely on u_vbuf to upload vertices for you, you shouldn't

Re: [Mesa-dev] Question about min_index/max_index calculation

2018-03-17 Thread Ilia Mirkin
On Sat, Mar 17, 2018 at 2:12 PM, Erico Nunes wrote: > Hi all, > > I have been working to add indexed drawing/glDrawElements support to > the mesa-lima driver currently in development > (https://github.com/yuq/mesa-lima). > For that implementation, it seems that we need to