[Mesa-dev] [PATCH] i965: Only set key->flat_shade if COL0/COL1 are written.

Kenneth Graunke kenneth at whitecape.org
Wed Aug 23 19:26:51 UTC 2017


On Wednesday, August 23, 2017 12:04:40 PM PDT Ilia Mirkin wrote:
> You might consider also including whether the interpolation method was
> forced or not. i.e. if you have
> 
> flat varying vec4 gl_Color;
> 
> then it doesn't matter whether shade model is flat or not, it'll be
> interpolated as flat. (Same with the other qualifiers made available
> in GL 3.0.)
> 
> So you only have to do funny stuff if either COL0 / COL1 don't have
> explicit interpolation qualifiers.
> 
> That might be over-optimizing it though. Your call. Just something
> that occurred to me.
> 
>   -ilia

Yeah, we definitely could do that.  I think I'd have to go loop over the
input variables, though, instead of checking a bitfield...which is a bit
of a pain.  Given that 'flat' was introduced with GLSL 1.30, which also
deprecated gl_Color, I doubt it's too common of a case.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170823/261873bf/attachment.sig>


More information about the mesa-dev mailing list