[Mesa-dev] shader cache backward compatibility

Timothy Arceri tarceri at itsqueeze.com
Wed Oct 3 00:33:40 UTC 2018


On 3/9/18 6:53 pm, Alexander Larsson wrote:
> On Mon, Sep 3, 2018 at 10:41 AM Alexander Larsson <alexl at redhat.com> wrote:
>>
>> On Fri, Aug 31, 2018 at 4:05 PM Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>>
>>> Valid point - I forgot about that.
>>>
>>> A couple of ideas come to mind:
>>>   - static link LLVM (Flatpak already does it)
>>> No LLVM changes needed.
>>>
>>>   - shared link LLVM
>>> LLVM add -Wl,--build-id=sha1
>>
>> As a very very simple workaround, can you add the file sizes (as well
>> as the mtimes) to the staleness check? I mean, its possible that a
>> rebuild generates the exact same size, but at least its better than
>> always being wrong.
> 
> Also, valentin david (of the freedesktop sdk project) started working
> on a solution based on build-ids:
>   https://gitlab.com/freedesktop-sdk/freedesktop-sdk/merge_requests/487/diffs
> 
> This currently relies on the freedesktop sdk having build-ids, but it
> would be easy for it to fall back on the mtime if that was not found.
> Also, this code is not really tested yet, but you still get the idea
> from looking at it, and it should work.
> 

I've pushed some changes. All drivers should now use build-ids when 
available, if not they will fall back to mtime. Also when falling back 
to mtine if mtime is 0 we disable the cache.

Hopefully these changes resolve the problems you were having.

Tim


More information about the mesa-dev mailing list