a1c765a44c
If every use was a conversion to 16, then ir3_cf would fold it into the bary instruction. But if something had generated a highp comparison of the mediump input with a mediump op result, it would get stuck as highp, even though we could have used 16-bit values without upconverting. This fixes dEQP-GLES2.functional.shaders.algorithm.rgb_to_hsl_fragment on ANGLE on turnip, closing #7043. fossil-db results are mixed: fossil-db: Totals from 697 (4.65% of 14988) affected shaders: MaxWaves: 10712 -> 10736 (+0.22%) Instrs: 82394 -> 83572 (+1.43%); split: -1.31%, +2.74% CodeSize: 178280 -> 180118 (+1.03%); split: -0.46%, +1.49% NOPs: 15887 -> 16067 (+1.13%); split: -7.48%, +8.61% MOVs: 1297 -> 1328 (+2.39%); split: -6.86%, +9.25% Full: 3730 -> 3842 (+3.00%); split: -1.80%, +4.80% (ss): 1877 -> 1849 (-1.49%); split: -5.59%, +4.10% (sy): 1249 -> 1255 (+0.48%); split: -1.04%, +1.52% (ss)-stall: 6809 -> 6364 (-6.54%); split: -13.85%, +7.31% (sy)-stall: 17059 -> 17257 (+1.16%); split: -6.51%, +7.67% Cat0: 17220 -> 17400 (+1.05%); split: -6.90%, +7.94% Cat1: 5307 -> 6366 (+19.95%); split: -6.93%, +26.89% Cat2: 39138 -> 39101 (-0.09%); split: -0.31%, +0.22% Cat3: 16772 -> 16741 (-0.18%) Cat5: 1269 -> 1276 (+0.55%) I tried to pick some apps to test that looked the most impacted, and indeed the results are mixed: cookie_run_kingdom: +0.275514% +/- 0.0883816% (n=68) trex_200: +0.0943847% +/- 0.0297073% (n=1463) command_and_conquer_rivals: no difference (n=131) war_planet_online: no difference (n=120) lego_legacy: -0.192131% +/- 0.152083% (n=99) among_us: -0.625227% +/- 0.385419% (n=60) Given that the perf results are small and go both ways, and apparently we're an outlier in not always lowering mediump inputs to 16-bit, just do it for consistency with other drivers. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18506>