From c40acdef52b1da97c90f5cef046ae881511f7d25 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Thu, 23 Jan 2020 22:39:35 -0800 Subject: [PATCH] iris: 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 Tested-by: Marge Bot Part-of: --- src/gallium/drivers/iris/iris_state.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 823afff6da3..479ad087d77 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -4183,6 +4183,13 @@ iris_store_tcs_state(struct iris_context *ice, hs.MaximumNumberofThreads = devinfo->max_tcs_threads - 1; hs.IncludeVertexHandles = true; +#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 = vue_prog_data->dispatch_mode; hs.IncludePrimitiveID = tcs_prog_data->include_primitive_id; -- 2.30.2