[Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

Christoph Bumiller e0425955 at student.tuwien.ac.at
Tue Dec 13 15:31:32 PST 2011


On 12/14/2011 12:24 AM, Marek Olšák wrote:
> On Tue, Dec 13, 2011 at 11:22 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
>> Another approach would be just to add the property, and kill output mask. Two ways of doing the same is what I'd like to avoid. I'll need a day (it's late here) to think about this and see how output mask is being actually used in the code.
> 
> I think it would be better to axe the UsageMask (unless there's a need
> to declare an output with the mask _Y_W for example) and add a
> NumComponents field. The interpolation of varyings would be less
> computionally-expensive if we knew the exact number of used components
> and the number were less than 4 (depends on hw).

I'd even save slots if a user only used, for example, gl_TexCoord[0].xw.
You cannot make it .xy internally because of point coordinate replacement.

If you want NumComponents, just do last_bit_set(UsageMask) + 1.

> 
> Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list