nir/i915g/r300/nv30: skip marking varyings as flat in some drivers
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 18 May 2022 02:00:30 +0000 (12:00 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 May 2022 01:05:32 +0000 (01:05 +0000)
commitc4cec842315313a24342d1d9a4dbd4ad11fbdd6c
treec85eb0b32b50c2cb35f9ce22f8595a47fb240193
parent2f38adda6383f426195f435fadb5c3b0c9fc1659
nir/i915g/r300/nv30: skip marking varyings as flat in some drivers

Some older drivers don't support GLSL versions with the concept of flat
varyings and also don't support integers. Here we add a new setting to
make sure we don't use the optimisation that sets varyings to flat.
This setting helps us avoid marking varyings as flat and therefore
potentially having them changed to ints via varying packing.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6500
Fixes: 7647023f3bb5 ("glsl: enable the use of the nir based varying linker")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16573>
src/compiler/nir/nir.h
src/compiler/nir/nir_linking_helpers.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/r300/r300_screen.c