From b1bb44cf65fbe3e34d6314ca99063865b4f41c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Fri, 27 Jan 2023 15:58:35 +0100 Subject: [PATCH] anv: fix how unset gl_Viewport & gl_Layer are handled in mesh case See also: c6f69eea6ac ("anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex") Reviewed-by: Caio Oliveira Part-of: --- src/intel/vulkan/genX_pipeline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 64ce2b90452..3cbf459c649 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -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 ?