Skip to main content

adapter_cache_key

Function adapter_cache_key 

Source
pub fn adapter_cache_key(info: &AdapterInfo) -> String
Expand description

A compact identity string for the adapter a cache blob was produced on.

A wgpu::PipelineCache is only ever valid for the same adapter+driver that produced it (wgpu validates this internally too, but framing the key lets us reject a foreign blob before the unsafe API is ever called). The driver / driver_info fields are included so a driver update — which can invalidate the compiled machine code — changes the key and discards the stale blob.