Function wgpu_core::track::texture::insert_or_merge

source ·
unsafe fn insert_or_merge(
    texture_selector: &TextureSelector,
    current_state_set: &mut TextureStateSet,
    resource_metadata: &mut ResourceMetadata<Arc<Texture>>,
    index: usize,
    state_provider: TextureStateProvider<'_>,
    metadata_provider: ResourceMetadataProvider<'_, Arc<Texture>>,
) -> Result<(), ResourceUsageCompatibilityError>
Expand description

Does an insertion operation if the index isn’t tracked in the current metadata, otherwise merges the given state with the current state. If the merging would cause a conflict, returns that usage conflict.

§Safety

Indexes must be valid indexes into all arrays passed in to this function, either directly or via metadata or provider structs.