anv: handle mesh in sbe_primitive_id_override

This prevents crashes seen in some upcoming cts tests.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32861>
This commit is contained in:
Tapani Pälli
2025-01-03 10:48:22 +02:00
committed by Marge Bot
parent 36bedf6c80
commit 72351afe24

View File

@@ -587,6 +587,14 @@ sbe_primitive_id_override(struct anv_graphics_pipeline *pipeline)
if (!wm_prog_data)
return false;
if (anv_pipeline_is_mesh(pipeline)) {
const struct brw_mesh_prog_data *mesh_prog_data =
get_mesh_prog_data(pipeline);
const struct brw_mue_map *mue = &mesh_prog_data->map;
return (wm_prog_data->inputs & VARYING_BIT_PRIMITIVE_ID) &&
mue->start_dw[VARYING_SLOT_PRIMITIVE_ID] == -1;
}
const struct intel_vue_map *fs_input_map =
&anv_pipeline_get_last_vue_prog_data(pipeline)->vue_map;