[Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

Roland Scheidegger sroland at vmware.com
Mon Feb 5 02:15:39 UTC 2018

Am 05.02.2018 um 03:04 schrieb Roland Scheidegger:
> Am 04.02.2018 um 20:13 schrieb Dave Airlie:
>> On 2 February 2018 at 18:02, Roland Scheidegger <sroland at vmware.com> wrote:
>>> Are you sure of that? You only get 11 stride bits to program, and they
>>> are in bytes. Therefore I can't see how you could program 2048 (unless
>>> the hw would interpet 0 as 2048 but I think stride 0 is valid there?).
>> Hmm so GL 4.4 defines the minimum for this to be 2048.
>> Could be a bit of a blocker :-)
>> Dave.
> I'm wondering what the blob did?
> I suppose you could always just lie - if the tests only care about the
> query and never actually test it you could get away with it...
> I mean, before GL 4.4, it was not even queryable and was supposed to
> always work no matter the stride, but in reality it would just silently
> fail...
> I was merely pointing out the limit there was probably intentional (so,
> if lying is the answer, I'd suggest a comment at least). (And I didn't
> verify what the hw really does with stride 0.)
> I guess alternatively you could fix it up in the vertex fetch shader
> (so, program stride 1024 in this case and lshift the id-to-fetch by 2 -
> albeit I do not actually understand how the VTX_FETCH_VERTEX_DATA and
> VTX_FETCH_INSTANCE_DATA work, but nevertheless I suppose it should be
> fixable to patch it up somehow).

Forgot to mention, I believe d3d11 also has a limit of 2048 - there is
no direct limit on strides, but there is
probably implies strides of 2048 should be working (and whck tests tend
to test such things). So not sure how it's done...

FWIW mesa's version calculation considers near zero numeric limits, only
extensions. I've recently added the min ubo count of 14 (starting with
gl 4.3) but that's about it. It will still happily announce higher
versions if you support for instance just 1 draw buffer (the extension
doesn't require more, gl starting from 3.0 or so would require 8, gles
for some versions 4), or as you noticed smaller max vertex strides.


More information about the mesa-dev mailing list