[Mesa-dev] [PATCH 2/2] st/mesa: use min_index and max_index directly from vbo

Marek Olšák maraeo at gmail.com
Mon May 8 20:07:28 UTC 2017


On Mon, May 8, 2017 at 8:46 PM, Rob Clark <robdclark at gmail.com> wrote:
> On Mon, May 8, 2017 at 1:52 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Mon, May 8, 2017 at 7:28 PM, Rob Clark <robdclark at gmail.com> wrote:
>>> This commit breaks 'glmark2 -b ideas' on a3xx..  probably a2xx too.
>>> (a4xx/a5xx, and from the looks of it, radeon, ignore min/max_index..)
>>> Nouveau also uses min/max_index, so wouldn't be surprised if this commit
>>> causes problems there too..
>>>
>>> Any particular need for this commit, or can I push a revert?
>>
>> It shouldn't cause any issues since min/max_index should be 0 and ~0
>> in cases when they don't matter. Why do you need to use min/max_index
>> if you don't do legacy vertex uploads in the driver? Can you just use
>> 0, ~0 in the hw registers like radeonsi?
>>
>
>
> fwiw, this particular case comes from vbo_exec_DrawElements():
>
>    vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
>                                    count, type, indices, 0, 1, 0);
>
> possibly that should be 0, ~0
>
> I didn't look through the other draw paths yet to see if there are
> more.  But I suspect we should fix this (even if I just hard-coded
> 0/~0), since nouveau seems like it cares about not having bogus bounds
> in at least some cases..

Ah yes, those should be fixed. I missed them somehow. All other
codepaths should already have 0, ~0.

Marek


More information about the mesa-dev mailing list