nir: Add transform feedback system values

These will be used to facilitate transform feedback lowering for Panfrost,
although other backends could use the sysvals in the future.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15720>
This commit is contained in:
Alyssa Rosenzweig
2022-04-01 17:20:09 -04:00
committed by Marge Bot
parent ba09a00a5c
commit 5c79d649af
2 changed files with 5 additions and 0 deletions

View File

@@ -138,6 +138,8 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
case nir_intrinsic_load_blend_const_color_rgba8888_unorm:
case nir_intrinsic_load_line_width:
case nir_intrinsic_load_aa_line_width:
case nir_intrinsic_load_xfb_address:
case nir_intrinsic_load_num_vertices:
case nir_intrinsic_load_fb_layers_v3d:
case nir_intrinsic_load_tcs_num_patches_amd:
case nir_intrinsic_load_ring_tess_factors_amd:

View File

@@ -807,6 +807,7 @@ system_value("workgroup_index", 1)
system_value("base_workgroup_id", 3, bit_sizes=[32, 64])
system_value("user_clip_plane", 4, indices=[UCP_ID])
system_value("num_workgroups", 3, bit_sizes=[32, 64])
system_value("num_vertices", 1)
system_value("helper_invocation", 1, bit_sizes=[1, 32])
system_value("layer_id", 1)
system_value("view_index", 1)
@@ -836,6 +837,8 @@ system_value("scratch_base_ptr", 0, bit_sizes=[32,64], indices=[BASE])
system_value("constant_base_ptr", 0, bit_sizes=[32,64])
system_value("shared_base_ptr", 0, bit_sizes=[32,64])
system_value("global_base_ptr", 0, bit_sizes=[32,64])
# Address of a transform feedback buffer, indexed by BASE
system_value("xfb_address", 1, bit_sizes=[32,64], indices=[BASE])
# System values for ray tracing.
system_value("ray_launch_id", 3)