From 60c789543e3738f3a39897758d7507da8c044d78 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Thu, 23 Jan 2020 22:27:53 -0800 Subject: [PATCH] anv: Set patch count threshold in 3DSTATE_HS Lets specifiy maximum number of patches that will be accumulated before a thread is dispatched. Signed-off-by: Sagar Ghuge Reviewed-by: Kenneth Graunke Part-of: --- src/intel/vulkan/genX_pipeline.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index e775c29a2c2..b02b9e96db5 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1623,6 +1623,13 @@ emit_3dstate_hs_te_ds(struct anv_graphics_pipeline *pipeline, hs.ScratchSpaceBasePointer = get_scratch_address(&pipeline->base, MESA_SHADER_TESS_CTRL, tcs_bin); +#if GEN_GEN == 12 + /* Patch Count threshold specifies the maximum number of patches that + * will be accumulated before a thread dispatch is forced. + */ + hs.PatchCountThreshold = tcs_prog_data->patch_count_threshold; +#endif + #if GEN_GEN >= 9 hs.DispatchMode = tcs_prog_data->base.dispatch_mode; hs.IncludePrimitiveID = tcs_prog_data->include_primitive_id; -- 2.30.2