mesa/src/compiler
Alyssa Rosenzweig d55bdb4ec5 nir/opt_preamble: add "register class" concept
Class represents an indexed "ideal" register class, where non-general classes
only allow defs that choose that class in the def_size callback.
nir_opt_preamble will try to assign specialized classes where possible, falling
back to the general class once the special-purpose classes are exhausted.

AGX will use this mechanism to promote bindless texture handles to bound texture
registers where possible, falling back to pushing the handle as a uniform where
not possible. Supporting multiple classes in nir_opt_preamble allows this
multi-level hoisting to work in a single nir_opt_preamble call with proper
global behaviour.

Add this concept to nir_opt_preamble so we can use it in AGX later in this MR.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35949>
2025-07-10 14:55:17 -04:00
..
clc clc: add support for cl_ext_image_unorm_int_2_101010 2025-06-30 18:04:59 +00:00
glsl glsl: fix MESA_GLSL_DISABLE_IO_OPT env var 2025-07-10 16:37:45 +00:00
isaspec meson: do not compile libisaspec unless used 2025-03-25 08:32:47 +00:00
libcl libcl: Add more UINT_MAX variants 2025-06-20 10:11:52 +00:00
nir nir/opt_preamble: add "register class" concept 2025-07-10 14:55:17 -04:00
rust compiler/rust/bitset: BitSetStream takes Key type 2025-06-09 21:49:29 +00:00
spirv nir: add nir_vectorize_cb callback parameter to nir_lower_phis_to_scalar() 2025-07-08 15:33:59 +00:00
builtin_types.py compiler: add float8 glsl types 2025-06-23 07:59:24 +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 compiler: Generate files with newline at end 2025-06-24 14:01:04 +00:00
glsl_types.c compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
glsl_types.h compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: Add SYSTEM_VALUE_FRAG_COORD_Z/W. 2025-06-18 23:11:36 +00:00
shader_enums.h nir: Add SYSTEM_VALUE_FRAG_COORD_Z/W. 2025-06-18 23:11:36 +00:00
shader_info.h nir: add shader_info::prev_stage_has_xfb 2025-06-12 19:35:37 +00:00