[Mesa-dev] [PATCH 2/2] anv/pipeline: Set the correct binding count for compute shaders

Jason Ekstrand jason at jlekstrand.net
Wed Feb 14 16:28:54 UTC 2018


On Tue, Feb 13, 2018 at 11:06 PM, Kenneth Graunke <kenneth at whitecape.org>
wrote:

> On Monday, February 12, 2018 7:35:05 PM PST Jason Ekstrand wrote:
> > ---
> >  src/intel/vulkan/genX_pipeline.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_
> pipeline.c
> > index 45ebe31..4aee9ec 100644
> > --- a/src/intel/vulkan/genX_pipeline.c
> > +++ b/src/intel/vulkan/genX_pipeline.c
> > @@ -1836,7 +1836,7 @@ compute_pipeline_create(
> >        .KernelStartPointer     = cs_bin->kernel.offset,
> >
> >        .SamplerCount           = get_sampler_count(cs_bin),
> > -      .BindingTableEntryCount = get_binding_table_entry_count(cs_bin),
> > +      .BindingTableEntryCount = 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),
> >
>
> Shouldn't this be MIN2(cs_bin->bind_map.surface_count, 31)?  It's simply
> a U5 value, not a U5-1 value...and says there are a maximum of 31 things
> that can be prefetched.
>

I'm adding 1 for the indirect parameters buffer.


> While we're here, I don't understand why get_binding_table_entry_count
> is DIV_ROUND_UP(bin->bind_map.surface_count, 32)...the docs for
> 3DSTATE_VS indicate that it's simply a 0..255 value.
>

Uh... I'm not sure.  I know I had a reason but maybe it's now bogus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180214/e98e2905/attachment.html>


More information about the mesa-dev mailing list