On 11/09/2011 02:20 PM, Ian Romanick wrote:
You mean, drop the 'var->location < FRAG_RESULT_DATA0' from the
if-statement below? That is probably true. It was a copy-and-paste from
GetAttributeLocation. The check *is* necessary there because there is no
'strncmp("gl_", name)' in that function. GetAttributeLocation can get
away with that because there is no shared locations between built-in and
user-defined. In the GetFragDataLocation, gl_FragData[] and user-defined
variables overlap.
How would you feel about a follow-on patch that makes the two functions
consistent with each other by removing the check from both loops and
adding the strcmp outside the loop in GetAttributeLocation?
I like that idea. Avoiding built-ins by strncmp'ing with "gl_" is
really self-explanatory.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev