mesa/st: Fix precompile misses on compat GL VSes writing to color outputs.
authorEric Anholt <eric@anholt.net>
Wed, 10 Mar 2021 22:46:16 +0000 (14:46 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 12 Mar 2021 21:14:27 +0000 (21:14 +0000)
commit1cf8cf99c891c02236c40a1f694efe3fcaa9f44f
treede6a9a1498f88b10729400d0287896c8978d1b45
parent35247ac017ad67cff6010a9f9039452f76f4db8c
mesa/st: Fix precompile misses on compat GL VSes writing to color outputs.

In compat GL, the gl_FrontColor/BackColor gets clamped unless you
explicitly turn it off with ARB_color_buffer_float, and most apps doing
floating point color rendering are going to be using non-compat varyings
anyway instead of hoping that ARB_color_buffer_float exists.  Thus, guess
that the app will get clamping on the color outputs to reduce draw-time
recompiles.

Saves 60 VS recompiles on half-life-2.trace on freedreno (and similarly for
many other compat GL apps).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509>
src/mesa/state_tracker/st_program.c