ID3D12ShaderCacheSession::FindValue method (d3d12.h)

Looks up an entry in the cache whose key exactly matches the provided key.

Call the function twice. The first time to retrieve the value's size, and the second time to retrieve the data. In-memory temporary storage makes this calling pattern performant.

Syntax

HRESULT FindValue(
  const void *pKey,
  UINT       KeySize,
  void       *pValue,
  UINT       *pValueSize
);

Parameters

pKey

Type: _In_reads_bytes_(KeySize) const void *

The key of the entry to look up.

KeySize

Type: UINT

The size of the key, in bytes.

pValue

Type: _Out_writes_bytes_(*pValueSize) void *

A pointer to a memory block that receives the cached entry.

pValueSize

Type: _Inout_ UINT*

A pointer to a UINT that receives the size of the cached entry, in bytes.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Return value Description
DXGI_ERROR_CACHE_HASH_COLLISION There's an entry with the same hash as the provided key, but the key doesn't exactly match.
DXGI_ERROR_NOT_FOUND The entry isn't present.

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

See also