radv: fix NGG streamout with VS and GPL on GFX11
With GPL it's not possible to know the primitive topology when compiling the pre-rasterization stages. For NGG, we use the maximum number of vertices per prim and rely on the hardware to ignore the extra bits for points/lines. Though, this can't work for NGG streamout because the number of vertices per prim is used to compute a streamout offset. The only way to solve this is to pass the number of vertices per prim through a new user SGPR. This fixes a bunch of streamout tests with Zink/RADV on GFX11. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21833>
This commit is contained in:

committed by
Marge Bot

parent
491887c9f2
commit
d750ad19fd
@@ -4980,6 +4980,8 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline *pipeline, struct radv
|
||||
pipeline->has_streamout = pipeline->last_vgt_api_stage_locs[AC_UD_STREAMOUT_BUFFERS].sgpr_idx != -1;
|
||||
pipeline->has_dynamic_samples = ps->info.user_sgprs_locs.shader_data[AC_UD_PS_NUM_SAMPLES].sgpr_idx != -1;
|
||||
pipeline->has_sample_positions = ps->info.ps.needs_sample_positions;
|
||||
pipeline->has_num_verts_per_prim =
|
||||
pipeline->last_vgt_api_stage_locs[AC_UD_NUM_VERTS_PER_PRIM].sgpr_idx != -1;
|
||||
|
||||
pipeline->base.push_constant_size = pipeline_layout.push_constant_size;
|
||||
pipeline->base.dynamic_offset_count = pipeline_layout.dynamic_offset_count;
|
||||
|
Reference in New Issue
Block a user