anv: Use vfg distribution mode = RR_STRICT for Xe2+

Performance tuning. Round Robin strict faster on Xe2 for some
workloads.

Speedup:
 - Borderlands3-dx11-trace: +4%
 - WolfensteinYoungblood-vk.g6: +1.5%
 - Cyberpunk2077-dx12vk-2160p-ultra: +0.5%

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32566>
This commit is contained in:
Felix DeGrood 2024-12-09 23:34:30 +00:00 committed by Marge Bot
parent 260f3b4444
commit 0f46c53b0c

View file

@ -1884,10 +1884,12 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *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*/
/* Gfx12.5: 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;
#if GFX_VER < 20
!anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL) ? RR_FREE :
#endif
RR_STRICT;
vfg.DistributionGranularity = needs_instance_granularity ?
InstanceLevelGranularity : BatchLevelGranularity;
#if INTEL_WA_14014851047_GFX_VER