[Mesa-dev] [PATCH 2/2] i965: Implement ARB_indirect_parameters

Ilia Mirkin imirkin at alum.mit.edu
Wed Aug 30 12:59:06 UTC 2017


On Wed, Aug 30, 2017 at 3:17 AM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> So as a random drive-by review, I think the risk in this implementation
> is that apps just set maxdrawcount to some high value . If I'm reading
> the spec correctly there is no real bound on the value except for the
> max-representable value for the integer.  Also AFAIK the AMD and NVidia
> implementation don't really get slower if you specify maxdrawcount very

Can't speak for AMD, but this is actually extremely similar (in
principle) to how this is handled on NVIDIA. It's a little cleaner
since there's a nice macro, but since macros can't have a variable
number of arguments, you have to feed it maxdrawcount args. Admittedly
this is the nouveau impl, but I'm almost certain that the blob does it
in a similar way.

> large, so I wouldn't be surprised if a good number of apps would set the
> maxdrawcount really high, like MAX_INT or something. I suspect you
> wouldn't want to emit that .

Let's hope not!

  -ilia


More information about the mesa-dev mailing list