[Mesa-dev] [PATCH v2 11/15] glsl/linker: dvec3/dvec4 may consume twice input vertex attributes

Dave Airlie airlied at gmail.com
Thu May 12 19:34:16 UTC 2016


On 13 May 2016 4:28 AM, "Antia Puentes" <apuentes at igalia.com> wrote:
>
> From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
>
> From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes):
>
> "A program with more than the value of MAX_VERTEX_ATTRIBS
> active attribute variables may fail to link, unless
> device-dependent optimizations are able to make the program
> fit within available hardware resources. For the purposes
> of this test, attribute variables of the type dvec3, dvec4,
> dmat2x3, dmat2x4, dmat3, dmat3x4, dmat4x3, and dmat4 may
> count as consuming twice as many attributes as equivalent
> single-precision types. While these types use the same number
> of generic attributes as their single-precision equivalents,
> implementations are permitted to consume two single-precision
> vectors of internal storage for each three- or four-component
> double-precision vector."
>
> This commits adds a flag that allows driver to specify if dvec3, dvec4,
> dmat2x3, dmat2x4, dmat3, dmat3x4, dmat4x3 and dmat4 count as consuming
> twice as many attributes as equivalent single-precision types (default
> value being false).

Doesn't this patch break all the drivers currently implementing this extension?

If I read it correctly, it creates the new Const, and then turns off
the feature.

I haven't found any hardware that doesn't consume two locations, so I didn't
care to implement optional support for it back when I wrote this.
Adding optional
support and breaking all the gallium drivers doesn't seem like the
correct answer
at this time either.

Dave.


More information about the mesa-dev mailing list