[Mesa-dev] [PATCH 04/22] i965: assign BindingTableEntryCount of INTERFACE_DESCRIPTOR_DATA

Jordan Justen jordan.l.justen at intel.com
Mon Sep 25 23:43:57 UTC 2017


On 2017-09-25 05:30:36, Rogovin, Kevin wrote:
> Hi,
> 
>  The value is the number of entries, not the size in bytes;
>  BindingTableEntryCount for compute/media is programmed the same way
>  as for all the other shader stages (where they too are divided by
>  4).
> 
>  FWIW, the hardware will work without this patch because genX
>  initializes the value as 0. When the value is zero, it means the
>  GPU will not prefetch the binding table entries.

The docs mention that in some cases if a kernel uses many entries,
then it may be preferable to set it to zero to prevent thrashing the
state cache.

Therefore, I wonder if we've noticed any performance changes (good or
bad) with this.

The docs also say it is ignore for child threads of the media pipe,
but I'm not sure what that might mean for GPGPU.

-Jordan

> 
> -----Original Message-----
> From: Landwerlin, Lionel G 
> Sent: Monday, September 25, 2017 3:10 PM
> To: Rogovin, Kevin <kevin.rogovin at intel.com>; mesa-dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH 04/22] i965: assign BindingTableEntryCount of INTERFACE_DESCRIPTOR_DATA
> 
> On 25/09/17 11:34, kevin.rogovin at intel.com wrote:
> > From: Kevin Rogovin <kevin.rogovin at intel.com>
> >
> > Signed-off-by: Kevin Rogovin <kevin.rogovin at intel.com>
> > ---
> >   src/mesa/drivers/dri/i965/genX_state_upload.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c 
> > b/src/mesa/drivers/dri/i965/genX_state_upload.c
> > index 6127616..bbb47ea 100644
> > --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
> > +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
> > @@ -4199,6 +4199,7 @@ genX(upload_cs_state)(struct brw_context *brw)
> >         .SamplerStatePointer = stage_state->sampler_offset,
> >         .SamplerCount = DIV_ROUND_UP(stage_state->sampler_count, 4) >> 2,
> >         .BindingTablePointer = stage_state->bind_bo_offset,
> > +      .BindingTableEntryCount = prog_data->binding_table.size_bytes / 
> > + 4,
> 
> I'm not sure this should be divided by 4. The documentation doesn't seemto say it behaves like SamplerCount.
> 
> >         .ConstantURBEntryReadLength = cs_prog_data->push.per_thread.regs,
> >         .NumberofThreadsinGPGPUThreadGroup = cs_prog_data->threads,
> >         .SharedLocalMemorySize = encode_slm_size(GEN_GEN,
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list