mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
anv: set number of viewports in clip state (mesh)
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15303>
This commit is contained in:
parent
81df66bfff
commit
f410c1142f
2 changed files with 12 additions and 0 deletions
|
|
@ -3670,6 +3670,12 @@ cmd_buffer_emit_clip(struct anv_cmd_buffer *cmd_buffer)
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -1601,6 +1601,12 @@ emit_3dstate_clip(struct anv_graphics_pipeline *pipeline,
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue