[Mesa-dev] [PATCH 2/2] i965/disk_cache: Add in the INTEL_DEBUG value to the renderer string

Jordan Justen jordan.l.justen at intel.com
Sun Jul 22 22:06:04 UTC 2018


On 2018-07-22 13:43:08, Lionel Landwerlin wrote:
> Nice catch!
> 
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

Thanks! Tim pointed out on irc that disk_cache_create has a
driver_flags param just for this purpose. Also, Jason asked that I
update the Anvil driver too. I'll try to send out a v2 today.

-Jordan

> 
> On 22/07/18 05:45, Jordan Justen wrote:
> > Since various options within INTEL_DEBUG could impact code generation,
> > we should add this into the renderer string so changing the
> > INTEL_DEBUG setting will cause the shader cache to work properly.
> >
> > An example that will affect the program generated by i965 is the
> > INTEL_DEBUG=nocompact option.
> >
> > Adding in the entire 64-bits of INTEL_DEBUG is overkill. Many
> > INTEL_DEBUG options won't actually impact the program generated by the
> > driver. Nevertheless, it is more maintainable and safer to just add
> > the entire 64-bit value.
> >
> > Cc: Timothy Arceri <tarceri at itsqueeze.com>
> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> >   src/mesa/drivers/dri/i965/brw_disk_cache.c | 7 ++++---
> >   1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c
> > index a678c355b9d..6e50476f812 100644
> > --- a/src/mesa/drivers/dri/i965/brw_disk_cache.c
> > +++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c
> > @@ -378,9 +378,10 @@ brw_disk_cache_init(struct intel_screen *screen)
> >   {
> >   #ifdef ENABLE_SHADER_CACHE
> >      /* array length: print length + null char + 1 extra to verify it is unused */
> > -   char renderer[11];
> > -   MAYBE_UNUSED int len = snprintf(renderer, sizeof(renderer), "i965_%04x",
> > -                                   screen->deviceID);
> > +   char renderer[28];
> > +   MAYBE_UNUSED int len =
> > +      snprintf(renderer, sizeof(renderer), "i965_%04x_%016" PRIx64,
> > +               screen->deviceID, INTEL_DEBUG);
> >      assert(len == sizeof(renderer) - 2);
> >   
> >      const struct build_id_note *note =
> 
> 


More information about the mesa-dev mailing list