shader: rework precise-emitting for built-ins
In 47324895 (shader: do not redeclare built-ins as precise), I confused a mesa shader-compiler bug with a spec problem. Turns out, redeclaring built-ins as precise is allowed by the spec, just the same as invariant variables. And even mesa allows this.
What mesa doesn't currently allow, is to redeclare a variable as both invariant and precise. This problem does not extend to new declarations, where this is already handled correctly.
So, let's avoid emitting both; it's not really needed to emit both, as they essentially have the same effect (disable reordering), just with some different usage-semantics. And for the cases we support, these are effectively the same.
This fixes dEQP-GLES31.functional.tessellation.common_edge.*_precise without breaking dEQP-GLES2.functional.shaders.algorithm.hsl_to_rgb_vertex this time.
Signed-off-by: Erik Faye-Lund erik.faye-lund@collabora.com