nir: add nir_intrinsic_load_num_vertices_per_primitive_amd

This is used in streamout as radeonsi pass this value for VS
by arg.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654>
This commit is contained in:
Qiang Yu
2022-06-30 17:06:51 +08:00
committed by Marge Bot
parent 417cf031a0
commit 2ae357aa23
2 changed files with 4 additions and 0 deletions

View File

@@ -183,6 +183,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
case nir_intrinsic_load_lshs_vertex_stride_amd:
case nir_intrinsic_load_hs_out_patch_data_offset_amd:
case nir_intrinsic_load_clip_half_line_width_amd:
case nir_intrinsic_load_num_vertices_per_primitive_amd:
is_divergent = false;
break;

View File

@@ -1424,6 +1424,9 @@ system_value("hs_out_patch_data_offset_amd", 1)
# line_width * 0.5 / abs(viewport_scale[2])
system_value("clip_half_line_width_amd", 2)
# Number of vertices in a primitive
system_value("num_vertices_per_primitive_amd", 1)
# V3D-specific instrinc for tile buffer color reads.
#
# The hardware requires that we read the samples and components of a pixel