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

Kenneth Graunke kenneth at whitecape.org
Wed Feb 14 07:06:58 UTC 2018


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.

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180213/cb61847f/attachment.sig>


More information about the mesa-dev mailing list