From 98c6db3fc8013fc0edee503c6b732b929e9aafb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Tue, 4 Apr 2023 08:40:34 +0300 Subject: [PATCH] anv: take primitive ID override to account Wa_14015297576 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit ca4ec49b0e0 took primitive ID override fields in to use, this has to be checked as part of Wa_14015297576. Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_private.h | 1 + src/intel/vulkan/genX_pipeline.c | 1 + src/intel/vulkan/gfx8_cmd_buffer.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 2583e81..94c4e55 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3115,6 +3115,7 @@ struct anv_graphics_pipeline { bool kill_pixel; bool force_fragment_thread_dispatch; bool uses_xfb; + bool primitive_id_override; /* Number of VERTEX_ELEMENT_STATE input elements used by the shader */ uint32_t vs_input_elements; diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index e78ff37..1cfbdf3 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -524,6 +524,7 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline) sbe.PrimitiveIDOverrideComponentY = true; sbe.PrimitiveIDOverrideComponentZ = true; sbe.PrimitiveIDOverrideComponentW = true; + pipeline->primitive_id_override = true; } } else { assert(anv_pipeline_is_mesh(pipeline)); diff --git a/src/intel/vulkan/gfx8_cmd_buffer.c b/src/intel/vulkan/gfx8_cmd_buffer.c index b7565ee..29dc23e 100644 --- a/src/intel/vulkan/gfx8_cmd_buffer.c +++ b/src/intel/vulkan/gfx8_cmd_buffer.c @@ -260,7 +260,8 @@ genX(cmd_emit_te)(struct anv_cmd_buffer *cmd_buffer) * * Disable Tessellation Distribution when primitive Id is enabled. */ - if (geom_or_tess_prim_id_used(pipeline)) + if (pipeline->primitive_id_override || + geom_or_tess_prim_id_used(pipeline)) te.TessellationDistributionMode = TEDMODE_OFF; } -- 2.7.4