anv: Set patch count threshold in 3DSTATE_HS
authorSagar Ghuge <sagar.ghuge@intel.com>
Fri, 24 Jan 2020 06:27:53 +0000 (22:27 -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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3563>

src/intel/vulkan/genX_pipeline.c

index e775c29a2c28ee3d9d5206c69e1c9b6846605a31..b02b9e96db5c5cdf689d3e73ed349e7e3054281d 100644 (file)
@@ -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;