aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-02-12 19:34:48 -0800
committerJason Ekstrand <[email protected]>2018-12-12 08:32:25 -0600
commite4fdc650f1c5ada29037daa954b2fd3b031cb328 (patch)
treebbbbe227f2a4466c368848fbcc0ba9be5959b651 /src/intel/vulkan
parent2ac6d55f38c1665a16d8d02675df2e3a858a7fec (diff)
anv/pipeline: Set the correct binding count for compute shaders
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/genX_pipeline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index cf15e79db51..629df477e73 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -1956,8 +1956,12 @@ compute_pipeline_create(
.KernelStartPointer = cs_bin->kernel.offset,
/* WA_1606682166 */
.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(cs_bin),
- /* Gen 11 workarounds table #2056 WABTPPrefetchDisable */
- .BindingTableEntryCount = GEN_GEN == 11 ? 0 : get_binding_table_entry_count(cs_bin),
+ /* Gen 11 workarounds table #2056 WABTPPrefetchDisable
+ *
+ * We add 1 because the CS indirect parameters buffer isn't accounted
+ * for in bind_map.surface_count.
+ */
+ .BindingTableEntryCount = GEN_GEN == 11 ? 0 : 1 + MIN2(cs_bin->bind_map.surface_count, 30),
.BarrierEnable = cs_prog_data->uses_barrier,
.SharedLocalMemorySize =
encode_slm_size(GEN_GEN, cs_prog_data->base.total_shared),