On Thu Jan 11 13:37:21 2024 +0000, Giovanni Mascellani wrote:
Is it allowed to open the same file more than once in the same process? From different processes? What happens if you use a different name for the same file, e.g. because of a non canonical path, symlinks, hardlinks?
In native it only works in the same process. A memory-only cache opened from a seprate process doesn't magically share data. An on-disk cache that's opened from different processes returns an error, even if the version matches. (I think an hresult-wrapped ERROR_SHARING_VIOLATION, but I am not sure any more. It was just an ad-hoc test, not something I included in the test itself.
Native doesn't allow specifying a file path like this, just a guid and if it should be placed in the current working directory or the user's home directory. d3d12's own caches use a name scheme that differs from this though (something like .exe filename, GPU name and GPU PCI IDs)