[Mesa-dev] [PATCH 88/88] i965: handle 32bit and 64bit version of shader cache objects

Kenneth Graunke kenneth at whitecape.org
Wed Sep 28 18:42:01 UTC 2016


On Wednesday, September 28, 2016 9:00:50 AM PDT Eric Anholt wrote:
> Timothy Arceri <timothy.arceri at collabora.com> writes:
> 
> > On Sun, 2016-09-25 at 19:51 -0700, Kenneth Graunke wrote:
> >> On Saturday, September 24, 2016 3:26:09 PM PDT Timothy Arceri wrote:
> >> > 
> >> > Pointers will have different lengths so we simple create a
> >> > different
> >> > sha1 for each platform.
> >> 
> >> I don't understand...you're putting pointers in the blob?  How can
> >> that
> >> work?  You obviously can't reload things from the cache as actual
> >> pointers, so you've got to be doing some kind of remapping from a
> >> "pointer" in the blob to a real pointer.
> >> 
> >> At that point, can't you just make the blob always use a uint64_t for
> >> pointers, and just pad with zeroes on 32-bit systems?  Then we could
> >> use the same copy for both...
> >
> > We probably could but we are currently using intptr_t for
> > storing/restoring pointers and ptrdiff_t during remapping as we
> > probably should be. Thoughts?
> 
> Use consistent uint64_t on disk and remap to 32/64 on the way back in,
> imo.

I agree...we should use explicitly sized types for anything on disk,
rather than ones which can vary based on architecture.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160928/10acd19f/attachment-0001.sig>


More information about the mesa-dev mailing list