[Mesa-dev] [PATCH 5/8] gallium: add get_disk_shader_cache() callback
Nicolai Hähnle
nhaehnle at gmail.com
Wed Feb 22 18:55:54 UTC 2017
On 22.02.2017 16:19, Michel Dänzer wrote:
> On 22/02/17 07:58 PM, Nicolai Hähnle wrote:
>> On 22.02.2017 07:23, Michel Dänzer wrote:
>>> On 22/02/17 12:45 PM, Timothy Arceri wrote:
>>>>
>>>> +get_disk_shader_cache
>>>> +^^^^^^^^^^^^^^^^^^^^^
>>>> +
>>>> +Returns a pointer to driver-specific on-disk shader cache. If the
>>>> driver
>>>> +failed to create the cache or does not support an on-disk shader
>>>> cache NULL is
>>>> +returned.
>>>
>>> [...]
>>>
>>>> + /**
>>>> + * Returns a pointer to driver-specific on-disk shader cache. If
>>>> the driver
>>>> + * failed to create the cache or does not support an on-disk
>>>> shader cache
>>>> + * NULL is returned.
>>>> + */
>>>> + struct disk_cache *(*get_disk_shader_cache)(struct pipe_screen
>>>> *screen);
>>>> };
>>>
>>> Drivers which don't support an on-disk shader cache don't set this
>>> callback in the first place, right? :) (Just a suggestion for
>>> improvement before landing this patch, not a blocker, no need to resend)
>>
>> Yeah, but creating the shader cache might have failed, or it might be
>> disabled. Perhaps a driver that doesn't do its own caching might want to
>> initialize the cache lazily. I think the interface is more flexible this
>> way.
>
> Sure. Maybe I was being too cryptic, sorry.
>
> What I mean is that the "or does not support an on-disk shader cache"
> language in the callback documentation is slightly misleading, since
> such drivers should simply not set the callback in the first place.
> That's all.
Ah, yes, that makes sense.
>
>
More information about the mesa-dev
mailing list