ID3D12ShaderCacheSession::SetDeleteOnDestroy method (d3d12.h)
When all cache session objects corresponding to a given cache are destroyed, the cache is cleared.
See Remarks for the ways in which a disk cache can be cleared.
Syntax
void SetDeleteOnDestroy();
Return value
None
Remarks
A disk cache can be cleared in one of the following ways.
- Explicitly, by calling SetDeleteOnDestroy on the session object, and then releasing the session.
- Explicitly, in developer mode, by calling ID3D12Device9::ShaderCacheControl with D3D12_SHADER_CACHE_KIND_FLAG_APPLICATION_MANAGED.
- Implicitly, by creating a session object with a version that doesn't match the version used to create it.
- Externally, by the disk cleanup utility enumerating it and clearing it. This won't happen for caches created with the D3D12_SHADER_CACHE_FLAG_USE_WORKING_DIR flag.
- Manually, by deleting the files (
*.idx
,*.val
, and*.lock
) stored on disk for D3D12_SHADER_CACHE_FLAG_USE_WORKING_DIR caches. Your application shouldn't attempt to do this for caches stored outside of the working directory.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 Build 20348 |
Minimum supported server | Windows 10 Build 20348 |
Header | d3d12.h |
Library | d3d12.lib |
DLL | d3d12.dll |