anv/pipeline: Set the correct binding count for compute shaders

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2018-02-12 19:34:48 -08:00
parent 2ac6d55f38
commit e4fdc650f1

View File

@@ -1956,8 +1956,12 @@ compute_pipeline_create(
.KernelStartPointer = cs_bin->kernel.offset, .KernelStartPointer = cs_bin->kernel.offset,
/* WA_1606682166 */ /* WA_1606682166 */
.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(cs_bin), .SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(cs_bin),
/* Gen 11 workarounds table #2056 WABTPPrefetchDisable */ /* Gen 11 workarounds table #2056 WABTPPrefetchDisable
.BindingTableEntryCount = GEN_GEN == 11 ? 0 : get_binding_table_entry_count(cs_bin), *
* 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, .BarrierEnable = cs_prog_data->uses_barrier,
.SharedLocalMemorySize = .SharedLocalMemorySize =
encode_slm_size(GEN_GEN, cs_prog_data->base.total_shared), encode_slm_size(GEN_GEN, cs_prog_data->base.total_shared),