Module wgpu_core::track::texture

source Β·
Expand description

Texture Trackers

Texture trackers are significantly more complicated than the buffer trackers because textures can be in a β€œcomplex” state where each individual subresource can potentially be in a different state from every other subtresource. These complex states are stored separately from the simple states because they are signifignatly more difficult to track and most resources spend the vast majority of their lives in simple states.

There are two special texture usages: UNKNOWN and UNINITIALIZED.

  • UNKNOWN is only used in complex states and is used to signify that the complex state does not know anything about those subresources. It cannot leak into transitions, it is invalid to transition into UNKNOWN state.
  • UNINITIALIZED is used in both simple and complex states to mean the texture is known to be in some undefined state. Any transition away from UNINITIALIZED will treat the contents as junk.

Structs§

  • Represents the complex state of textures where every subresource is potentially in a different state.
  • Stores all texture state within a device.
  • Specifies a particular set of subresources in a texture.
  • TextureStateSet πŸ”’
    Container for corresponding simple and complex texture states.
  • TextureTracker πŸ”’
    Stores all texture state within a command buffer.
  • Stores all texture state within a single usage scope.
  • Stores a bind group’s texture views + their usages (within the bind group).

Enums§

  • EitherIter πŸ”’
    An iterator adapter that can store two different iterator types.
  • Container that signifies storing both different things if there is a single state or many different states involved in the operation.
  • A source of texture state.

Traits§

Functions§

  • barrier πŸ”’ ⚠
  • insert πŸ”’ ⚠
  • insert_or_barrier_update πŸ”’ ⚠
    If the resource isn’t tracked
  • insert_or_merge πŸ”’ ⚠
    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.
  • merge πŸ”’ ⚠
  • update πŸ”’ βš