Struct spirv_std::image::Image

source ·
pub struct Image<SampledType: SampleType<FORMAT>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32> { /* private fields */ }
Expand description

An opaque image type. Corresponds to OpTypeImage.

You likely want to write this type using the crate::Image! macro helper, as the generic arguments here can get extremely verbose.

See SPIR-V OpTypeImage specification for the meaning of integer parameters.

Implementations§

Fetch a single texel with a sampler set at compile time

Gathers the requested component from four texels.

Sample texels at coord from the image using sampler.

Sample texels at coord from the image using sampler, after adding the input bias to the implicit level of detail.

Fetch a single texel with a sampler set at compile time Sample the image at a coordinate by a lod

Sample the image based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy])

Sample the image’s depth reference

Sample the image’s depth reference based on an explicit lod

Sample the image’s depth reference based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy])

Sample the image with a project coordinate

Sample the image with a project coordinate by a lod

Sample the image with a project coordinate based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy])

Sample the image’s depth reference with the project coordinate

Sample the image’s depth reference with the project coordinate based on an explicit lod

Sample the image’s depth reference with the project coordinate based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy])

Read a texel from an image without a sampler.

Write a texel to an image without a sampler.

Read a texel from an image without a sampler.

Write a texel to an image without a sampler.

Read a texel from subpass input attachment. Note: Vulkan only allows the read if the first two components of the coordinate are zero.

Query the number of mipmap levels.

Query the mipmap level and the level of detail for a hypothetical sampling of Image at Coordinate using an implicit level of detail. The first component of the result contains the mipmap array layer. The second component of the result contains the implicit level of detail relative to the base level.

Query the dimensions of Image, with no level of detail.

Query the dimensions of Image, with no level of detail.

Query the number of samples available per texel fetch in a multisample image.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.