From 275bcbd7a7001fd31f39b63c94697e6cfbc3e469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 4 Mar 2024 10:38:29 +0200 Subject: [PATCH] anv: setup distribution granularity with Wa_14019166699 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workaround describes that we need to set instance level distribution granularity when primitive id is used by the draw. Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/genX_pipeline.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 7824960c78d..948c68b7ff9 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1961,12 +1961,18 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *pipeline, #endif #if GFX_VERx10 >= 125 + bool needs_instance_granularity = + intel_needs_workaround(pipeline->base.base.device->info, 14019166699) && + (sbe_primitive_id_override(pipeline) || + geom_or_tess_prim_id_used(pipeline)); + anv_pipeline_emit(pipeline, partial.vfg, GENX(3DSTATE_VFG), vfg) { /* If 3DSTATE_TE: TE Enable == 1 then RR_STRICT else RR_FREE*/ vfg.DistributionMode = anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL) ? RR_STRICT : RR_FREE; - vfg.DistributionGranularity = BatchLevelGranularity; + vfg.DistributionGranularity = needs_instance_granularity ? + InstanceLevelGranularity : BatchLevelGranularity; #if INTEL_WA_14014851047_GFX_VER vfg.GranularityThresholdDisable = intel_needs_workaround(pipeline->base.base.device->info, 14014851047);