Skip to content

glsl: optimise dead built-in varyings in core profile

Timothy Arceri requested to merge tarceri/mesa:opt_compat_shaders into main

This code to skip the built-in optimisations in core profile has existed since this code was first committed around 10 years ago. However the assumption that shaders used in core profile don't contain built-ins has always been wrong.

There are a couple of ways a shader used in a core profile can contain one of these built-in varyings.

  1. The core profile uses shaders with an old shader version.
  2. The core profile uses shaders that enable compat shader functionality explicitly even in the latest shader versions.

Rather than adding any new code to track if we are using a compat shader we simply enable the optimisation to attempt to run on all desktop shaders.

Merge request reports