From cd38b6e2e857037a195916cdcffce50ebc10a0ef Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Fri, 10 Sep 2021 15:17:54 -0700 Subject: [PATCH] anv, iris: Implement Wa_14014890652 for DG2 Workaround is to set: 3DSTATE_VFG::GranularityThresholdDisable = 1 3DSTATE_VFG::DistributionGranularity = BATCH 3DSTATE_VF::GeometryDistributionEnable = 1 Signed-off-by: Sagar Ghuge Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_state.c | 3 +++ src/intel/vulkan/gfx8_cmd_buffer.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 1c9266aa868..91bf74a7b4d 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -6639,6 +6639,9 @@ iris_upload_dirty_render_state(struct iris_context *ice, ice->shaders.prog[MESA_SHADER_TESS_EVAL] != NULL ? RR_STRICT : RR_FREE; vfg.DistributionGranularity = BatchLevelGranularity; + /* Wa_14014890652 */ + if (intel_device_info_is_dg2(&batch->screen->devinfo)) + vfg.GranularityThresholdDisable = 1; vfg.ListCutIndexEnable = draw->primitive_restart; /* 192 vertices for TRILIST_ADJ */ vfg.ListNBatchSizeScale = 0; diff --git a/src/intel/vulkan/gfx8_cmd_buffer.c b/src/intel/vulkan/gfx8_cmd_buffer.c index c5ec44b65af..94b813c6a78 100644 --- a/src/intel/vulkan/gfx8_cmd_buffer.c +++ b/src/intel/vulkan/gfx8_cmd_buffer.c @@ -695,6 +695,9 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL) ? RR_STRICT : RR_FREE; vfg.DistributionGranularity = BatchLevelGranularity; + /* Wa_14014890652 */ + if (intel_device_info_is_dg2(&cmd_buffer->device->info)) + vfg.GranularityThresholdDisable = 1; vfg.ListCutIndexEnable = d->primitive_restart_enable; /* 192 vertices for TRILIST_ADJ */ vfg.ListNBatchSizeScale = 0;