anv: fix how unset gl_Viewport & gl_Layer are handled in mesh case

See also: c6f69eea6a ("anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17620>
This commit is contained in:
Marcin Ślusarz
2023-01-27 15:58:35 +01:00
committed by Marge Bot
parent 9d3e3c15f3
commit b1bb44cf65
+5
View File
@@ -955,7 +955,12 @@ emit_3dstate_clip(struct anv_graphics_pipeline *pipeline,
if (vp && vp->viewport_count > 0 &&
mesh_prog_data->map.start_dw[VARYING_SLOT_VIEWPORT] >= 0) {
clip.MaximumVPIndex = vp->viewport_count - 1;
} else {
clip.MaximumVPIndex = 0;
}
clip.ForceZeroRTAIndexEnable =
mesh_prog_data->map.start_dw[VARYING_SLOT_LAYER] < 0;
}
clip.NonPerspectiveBarycentricEnable = wm_prog_data ?