mesa/src/compiler
Benjamin Lee 081438ad39 panfrost: add nir pass to lower noperspective varyings
Mali only supports perspective-correct varying interpolation in
hardware, so we have to emulate noperspective with lowering in both the
VS and FS.

Both vulkan and opengl allow mismatched interpolation qualifiers between
stages. Because we need all varyings that are noperspective in the FS to
be lowered in the VS, we cannot rely on the interpolation qualifiers in
the VS. Loading the set of noperspective varyings as a sysval allows the
implementation to pass them as a compile-time constant when known
statically, or a runtime push constant when not. Passing noperspective
varyings dynamically has a performance cost with unnecessary branches
and fmuls.

This sysval is not hooked up yet in either panfrost or panvk, so shader
compilation will fail.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
..
clc meson: Add mesa-clc and install-mesa-clc options 2024-12-23 15:09:40 +00:00
glsl glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers 2024-12-24 05:54:07 -05:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
libcl libcl: add VkDraw(Indexed)IndirectCommand definitions 2024-12-12 21:16:12 +00:00
nir panfrost: add nir pass to lower noperspective varyings 2025-01-03 07:04:05 +00:00
rust compiler/rust/bitset: Test next_unset() 2025-01-02 20:52:48 +00:00
spirv meson: Add mesa-clc and install-mesa-clc options 2024-12-23 15:09:40 +00:00
builtin_types.py compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c compiler/glsl_types: add glsl_get_word_size_align_bytes 2024-12-12 21:16:13 +00:00
glsl_types.h compiler/glsl_types: add glsl_get_word_size_align_bytes 2024-12-12 21:16:13 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add load_front_face_fsign 2024-12-30 22:31:34 +00:00
shader_enums.h nir: add load_front_face_fsign 2024-12-30 22:31:34 +00:00
shader_info.h nir: add option to use compact view indices 2024-12-09 20:31:49 +00:00