Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15303>
cmd_buffer->state.gfx.dynamic.viewport.count > 0 ?
cmd_buffer->state.gfx.dynamic.viewport.count - 1 : 0;
}
+ } else if (anv_pipeline_is_mesh(pipeline)) {
+ const struct brw_mesh_prog_data *mesh_prog_data = get_mesh_prog_data(pipeline);
+ if (mesh_prog_data->map.start_dw[VARYING_SLOT_VIEWPORT] >= 0) {
+ uint32_t viewport_count = cmd_buffer->state.gfx.dynamic.viewport.count;
+ clip.MaximumVPIndex = viewport_count > 0 ? viewport_count - 1 : 0;
+ }
}
GENX(3DSTATE_CLIP_pack)(NULL, dwords, &clip);
clip.UserClipDistanceClipTestEnableBitmask = last->clip_distance_mask;
clip.UserClipDistanceCullTestEnableBitmask = last->cull_distance_mask;
#endif
+ } else if (anv_pipeline_is_mesh(pipeline)) {
+ const struct brw_mesh_prog_data *mesh_prog_data = get_mesh_prog_data(pipeline);
+ if (vp_info && vp_info->viewportCount > 0 &&
+ mesh_prog_data->map.start_dw[VARYING_SLOT_VIEWPORT] >= 0) {
+ clip.MaximumVPIndex = vp_info->viewportCount - 1;
+ }
}
#if GFX_VER == 7