[Mesa-dev] [PATCH 6/6] anv: Rework pipeline caching

Roland Mainz roland.mainz at nrubsig.org
Thu Aug 25 22:48:39 UTC 2016


On Fri, Aug 26, 2016 at 12:28 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> The original pipeline cache the Kristian wrote was based on a now-false
> premise that the shaders can be stored in the pipeline cache.  The Vulkan
> 1.0 spec explicitly states that the pipeline cache object is transiant and
> you are allowed to delete it after using it to create a pipeline with no
> ill effects.  As nice as Kristian's design was, it doesn't jive with the
> expectation provided by the Vulkan spec.
>
> The new pipeline cache uses reference-counted anv_shader_bin objects that
> are backed by a large state pool.  The cache itself is just a hash table
> mapping SHA1 hashes to anv_shader_bin objects.
[snip]

Nitpicking: SHA1+size (of code) would be "safer" (because it reduces
the risk of hash collisions to two chunks of bytes of exactly the same
size) ... and it might help with lookup performance if you only
compare the sizes first...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)


More information about the mesa-dev mailing list