[Mesa-stable] [Mesa-dev] [PATCH v2 01/18] anv: Add the pci_id into the shader cache UUID

Andres Gomez agomez at igalia.com
Tue Apr 25 00:17:26 UTC 2017


Hi Jason,

this patch landed in master with Cc to stable.

However, the changes need commit 656e30b6860 and quite some other
dependencies (util/build_id.h)

Additionally, Tapani is mentioning problems in Android and the
probability of the issue that is trying to fix seems unlikely (?).

Should we drop this patch from the stable branch?

Br.

On Thu, 2017-04-20 at 10:11 +0300, Tapani Pälli wrote:
> 
> On 03/14/2017 04:26 AM, Jason Ekstrand wrote:
> > This prevents a user from using a cache created on one hardware
> > generation on a different one.  Of course, with Intel hardware, this
> > requires moving their drive from one machine to another but it's still
> > possible and we should prevent it.
> > 
> > Reviewed-by: Chad Versace <chadversary at chromium.org>
> > ---
> >   src/intel/vulkan/anv_device.c | 22 +++++++++++++++++-----
> >   1 file changed, 17 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> > index be2b2f3..5db0a6c 100644
> > --- a/src/intel/vulkan/anv_device.c
> > +++ b/src/intel/vulkan/anv_device.c
> > @@ -32,6 +32,7 @@
> >   #include "util/strtod.h"
> >   #include "util/debug.h"
> >   #include "util/build_id.h"
> > +#include "util/mesa-sha1.h"
> >   #include "util/vk_util.h"
> >   
> >   #include "genxml/gen7_pack.h"
> > @@ -53,17 +54,28 @@ compiler_perf_log(void *data, const char *fmt, ...)
> >   }
> >   
> >   static bool
> > -anv_device_get_cache_uuid(void *uuid)
> > +anv_device_get_cache_uuid(void *uuid, uint16_t pci_id)
> >   {
> >      const struct build_id_note *note = build_id_find_nhdr("libvulkan_intel.so");
> >      if (!note)
> >         return false;
> >   
> > -   unsigned len = build_id_length(note);
> > -   if (len < VK_UUID_SIZE)
> > +   unsigned build_id_len = build_id_length(note);
> > +   if (build_id_len < 20) /* It should be a SHA-1 */
> 
> This line here causes issues for Android, for us the build_id_len seems 
> to be 16 (and worked before nicely as check was against VK_UUID_SIZE 
> which is 16). I just bisected this and haven't yet figured out why but 
> will check.
> 
> // Tapani
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres


More information about the mesa-stable mailing list