Module wgpu_core::track::texture

source ·
Expand description

Texture Trackers

  • Texture trackers are signifigantly 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 seperately 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 the textures that a bind group stores.
  • Specifies a particular set of subresources in a texture.
  • Container for corresponding simple and complex texture states.
  • Stores all texture state within a command buffer or device.
  • Stores all texture state within a single usage scope.

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.

Functions

  • barrier 🔒
  • insert 🔒
  • 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 🔒
  • Helper function that gets what is needed from the texture storage out of the texture storage.
  • update 🔒