iris: Set patch count threshold in 3DSTATE_HS
authorSagar Ghuge <sagar.ghuge@intel.com>
Fri, 24 Jan 2020 06:39:35 +0000 (22:39 -0800)
committerMarge Bot <eric+marge@anholt.net>
Mon, 23 Mar 2020 17:57:57 +0000 (17:57 +0000)
Lets specifiy maximum number of patches that will be accumulated before
a thread is dispatched.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3563>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3563>

src/gallium/drivers/iris/iris_state.c

index 823afff6da3fee39d1bff2c3bf3b888971fa68bb..479ad087d77e786abcc0eb5c8e8491bf91f82335 100644 (file)
@@ -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;