spirv,nir: add support for BaryCoord{NoPersp}KHR builtins
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 12 May 2022 13:50:04 +0000 (15:50 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Jun 2023 13:25:43 +0000 (13:25 +0000)
commitc2ec23ab846bf049aad25fd0cd0696f9e18ea260
tree10868c704066b26197472a66069329aadaab2c1a
parentc49a052cbf4e0414c41c73c9ae508a2a26e0eead
spirv,nir: add support for BaryCoord{NoPersp}KHR builtins

This introduces new intrinsics nir_intrinsic_load_barycentric_coord_xxx
with 3-components instead of expanding the existing ones that are
supposed to interpolate input varyings, while BaryCoord is a sysval
on most hardware.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23254>
src/compiler/nir/nir_divergence_analysis.c
src/compiler/nir/nir_gather_info.c
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_system_values.c
src/compiler/shader_enums.h
src/compiler/spirv/vtn_variables.c