[Mesa-dev] [PATCH 8/8] st/mesa: add double input support including lowering (v3)

Dave Airlie airlied at gmail.com
Mon May 4 16:33:15 PDT 2015

On 30 April 2015 at 13:23, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Wed, Apr 29, 2015 at 9:14 PM, Dave Airlie <airlied at gmail.com> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>> This takes a different approach to previously, we cannot index into the
>> inputMapping with anything but the mesa attribute index, so we can't use
>> the just add one to index trick, we need more info to add one to it
>> after we've mapped the input.
> Almost certainly a failing on my part, but the above makes little sense to me.

Clarifying this is also the answer to all the questions below as well I think,

Due to the double taking one attribute location, but using two hw slots, I can't
just use attr + 1, VERT_ATTRIB_GENERIC0 could be a dvec4 attribute,
and VERT_ATTRIB_GENERIC1 could also be a different dvec4 attribute.

So the mapping from TGSI input where we want
GENERIC0 to map to input 0,1
GENERIC1 to map to input 2,3

So input 1, can map to GENERIC0, not GENERIC0+1

We also don't want to process each mesa attribute twice, so when we find
a mesa attribute that is a double one, we do the double processing at
that point,

so we have the placeholder, which means this TGSI input is just the second
part of a mesa attribute you already processed, no need to process it again,
so we just return a NULL client array for it so we skip it.

Not sure if this helps make more or less sense :-)


More information about the mesa-dev mailing list