Re: [Mesa-dev] [PATCH v2] glsl: enforce invariant conditions for built-in variables

2016-05-09 Thread Ilia Mirkin
You should be able to check for the slot, which is faster than a strcmp. Also in the second if, you can hoist the invariant check up to the second containing if to avoid a bit of unnecessary work. On May 9, 2016 9:46 AM, "Lars Hamre" wrote: > v2: > - ES version check (Tapani Pälli) > > The condi

[Mesa-dev] [PATCH v2] glsl: enforce invariant conditions for built-in variables

2016-05-09 Thread Lars Hamre
v2: - ES version check (Tapani Pälli) The conditions for which certain built-in special variables can be declared invariant were not being checked. GLSL ES 1.00 specification, Section "Invariance and linkage" says: For the built-in special variables, gl_FragCoord can only be declared invariant