pub struct BorrowedTextures {
pub textures: Vec<Texture>,
pub size: Size,
pub depth_textures: Vec<Texture>,
}Expand description
A ring of the host’s 2D textures, of size pixels and one format, with
one layer, one mip level, one sample and RENDER_ATTACHMENT usage.
Fields§
§textures: Vec<Texture>§size: Size§depth_textures: Vec<Texture>The host’s textures that frames draw their depth and stencil into
and store, one for each of textures, of their size and kind and one
depth and stencil format, or none for depth of the target’s own.
Implementations§
Source§impl BorrowedTextures
impl BorrowedTextures
Sourcepub fn sync_kinds() -> (SyncKinds, SyncKinds)
pub fn sync_kinds() -> (SyncKinds, SyncKinds)
The kinds of sync with which the host can wait for a frame (the producer’s) and the target for the host’s reads (the consumer’s): both share the device’s queue. In a browser, which can’t block on the GPU, a frame is handed over in queue order only.
Sourcepub fn depth_stencil_formats(device: &Device) -> DepthStencilFormats
pub fn depth_stencil_formats(device: &Device) -> DepthStencilFormats
The formats of the depth textures that frames draw into on device.
Sourcepub fn check(&self) -> Result<(), Error>
pub fn check(&self) -> Result<(), Error>
Checks the textures against their ring.
Fails with ErrorKind::InvalidArgument for a
texture of another size than the ring’s, of another format than the
first, or that a frame can’t render into, for depth textures that
aren’t one for each texture, and with
ErrorKind::Unsupported for depth textures of
no depth and stencil format.