summaryrefslogtreecommitdiff
path: root/src/intel/vulkan/genX_pipeline.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-01-21 17:54:01 +0200
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-01-23 15:06:59 +0200
commitd101907de97fad39bde70d05975cb2bfa5e8dbb8 (patch)
treead57c0ba41265c24bdd68e0977e7102557da4efb /src/intel/vulkan/genX_pipeline.c
parentbf74a7f092126a985418956df9b249ec128d73cd (diff)
anv/iris: warn gen12 3DSTATE_HS restriction
This should never happen but better off documenting it in case someone plays with max threads numbers. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3489> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3489>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r--src/intel/vulkan/genX_pipeline.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 82be5ab90ea..4dda92202d7 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -1589,6 +1589,17 @@ emit_3dstate_hs_te_ds(struct anv_pipeline *pipeline,
/* WA_1606682166 */
hs.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(tcs_bin);
hs.BindingTableEntryCount = get_binding_table_entry_count(tcs_bin);
+
+#if GEN_GEN >= 12
+ /* GEN:BUG:1604578095:
+ *
+ * Hang occurs when the number of max threads is less than 2 times
+ * the number of instance count. The number of max threads must be
+ * more than 2 times the number of instance count.
+ */
+ assert((devinfo->max_tcs_threads / 2) > tcs_prog_data->instances);
+#endif
+
hs.MaximumNumberofThreads = devinfo->max_tcs_threads - 1;
hs.IncludeVertexHandles = true;
hs.InstanceCount = tcs_prog_data->instances - 1;