radeonsi: don't overwrite info.tess._primitive mode when it can be correct

The linker now sets TCS info to match TES, and the key can contain 0
if it's not optimized.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
This commit is contained in:
Marek Olšák 2024-09-30 21:03:04 -04:00
parent 3570edeae2
commit e28e05ffe4

View file

@ -1870,7 +1870,8 @@ static bool si_lower_io_to_mem(struct si_shader *shader, nir_shader *nir,
key->ge.opt.same_patch_vertices, sel->info.tcs_vgpr_only_inputs);
/* Used by hs_emit_write_tess_factors() when monolithic shader. */
nir->info.tess._primitive_mode = key->ge.opt.tes_prim_mode;
if (nir->info.tess._primitive_mode == TESS_PRIMITIVE_UNSPECIFIED)
nir->info.tess._primitive_mode = key->ge.opt.tes_prim_mode;
NIR_PASS_V(nir, ac_nir_lower_hs_outputs_to_mem, si_map_io_driver_location,
sel->screen->info.gfx_level,