[Mesa-dev] [PATCH v2] panfrost: Take into account a index_bias for glDrawElementsBaseVertex calls

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Mon Aug 5 15:59:31 UTC 2019


> Bifrost does not accept a index_bias and relies instead on a bias
> correction offset ( offset_bias_correction ) in order to calculate the
> unbiased vertex index.

Bifrost?

> +        /* Negative of min_index. This is done in order to identify each vertex
> +           in vertex shader runs.
> +
> +           The hardware adds negative_start in each run, so that absent an
> +           index bias, the first vertex processed is genuinely the first
> +           vertex (0). But with an index bias, the first vertex process
> +           is numbered the same as the bias.
> +
> +           To represent this more conviniently:
> +           current_vertex_index = min_index + index_bias + negative_start
> +
> +           This is done since the hardware doesn't accept a index_bias
> +           and this allows it to recover the unbiased index.
> +         */

Please match the style conventions of other parts of the driver.

Is this used for the vertex shader runs? As far as I can tell, this is
specified for tiler jobs, which would means it's used either for tiling
or for fragment shaders. The vertex shaders, in fact, don't appear to
access this.

What is min_index in this context? That's a variable name in
pan_context.c (driver code), not inherent to the hardware, no?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190805/41b05873/attachment.sig>


More information about the mesa-dev mailing list