nir: Add a nir_sysvals_to_varyings() helper

Allow backends to turn some sysvals into input varyings so the frontend
(in our case spirv_to_nir()) doesn't have to bother selecting which
one is expected.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017>
This commit is contained in:
Boris Brezillon
2021-09-27 14:20:20 +02:00
committed by Marge Bot
parent b71bdc3404
commit 56251f924d
3 changed files with 83 additions and 0 deletions

View File

@@ -207,6 +207,7 @@ files_libnir = files(
'nir_lower_bit_size.c',
'nir_lower_ubo_vec4.c',
'nir_lower_uniforms_to_ubo.c',
'nir_lower_sysvals_to_varyings.c',
'nir_metadata.c',
'nir_move_vec_src_uses_to_dest.c',
'nir_normalize_cubemap_coords.c',