Struct wgpu_core::pipeline_cache::PipelineCacheHeader
source · #[repr(C)]struct PipelineCacheHeader {
magic: [u8; 8],
header_version: u32,
cache_abi: u32,
backend: u8,
adapter_key: [u8; 15],
validation_key: [u8; 16],
data_size: u64,
hash_space: u64,
}
Fields§
§magic: [u8; 8]
The magic header to ensure that we have the right file format Has a value of MAGIC, as above
header_version: u32
The version of this wgpu header Should be equal to HEADER_VERSION above
This must always be the second item, after the value above
cache_abi: u32
The number of bytes in the pointers of this ABI, because some drivers have previously not distinguished between their 32 bit and 64 bit drivers leading to Vulkan data corruption
backend: u8
The id for the backend in use, from wgt::Backend
adapter_key: [u8; 15]
The key which identifiers the device/adapter. This is used to validate that this pipeline cache (probably) was produced for the expected device. On Vulkan: it is a combination of vendor ID and device ID
validation_key: [u8; 16]
A key used to validate that this device is still compatible with the cache
This should e.g. contain driver version and/or intermediate compiler versions
data_size: u64
The length of the data which is sent to/recieved from the backend
hash_space: u64
Space reserved for a hash of the data in future
We assume that your cache storage system will be relatively robust, and so do not validate this hash
Therefore, this will always have a value of HASH_SPACE_VALUE
Implementations§
Trait Implementations§
source§impl PartialEq for PipelineCacheHeader
impl PartialEq for PipelineCacheHeader
source§fn eq(&self, other: &PipelineCacheHeader) -> bool
fn eq(&self, other: &PipelineCacheHeader) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for PipelineCacheHeader
impl StructuralPartialEq for PipelineCacheHeader
Auto Trait Implementations§
impl Freeze for PipelineCacheHeader
impl RefUnwindSafe for PipelineCacheHeader
impl Send for PipelineCacheHeader
impl Sync for PipelineCacheHeader
impl Unpin for PipelineCacheHeader
impl UnwindSafe for PipelineCacheHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.