On Thu Jan 11 13:37:20 2024 +0000, Giovanni Mascellani wrote:
Do these sizes count the sum of the sizes of stored keys and values, or the actual storage occupation, which in general I suppose might be larger (or even smaller, if compression is used)? Also, I don't like too much the idea that setting a specific (degenerate, but in principle valid) value for a numeric parameter triggers a behavior change (like the multiple handles to the same object below). Could `in_memory` be a separate boolean parameter?
As far as ID3D12ShaderCacheSession is concerned, both key and value sizes count towards the size (See https://gitlab.winehq.org/stefan/vkd3d/-/tree/cache-rework for tests which aren't included in this MR). I haven't tested the impact of compression and haven't checked if native compresses the storage at all.
I think a flag for specifying a memory-only cache is a good idea. I (ab)used the disk_size = 0 before adding the flags field to the cache desc structure.