logo
pub struct ShaderModule { /* private fields */ }
Expand description

Contains SPIR-V code with one or more entry points.

Implementations

Builds a new shader module from SPIR-V 32-bit words. The shader code is parsed and the necessary information is extracted from it.

Safety
  • The SPIR-V code is not validated beyond the minimum needed to extract the information.

As from_words, but takes a slice of bytes.

Panics
  • Panics if the length of bytes is not a multiple of 4.

As from_words, but does not parse the code. Instead, you must provide the needed information yourself. This can be useful if you’ve already done parsing yourself and want to prevent Vulkano from doing it a second time.

Safety
  • The SPIR-V code is not validated at all.
  • The provided information must match what the SPIR-V code contains.

As from_words_with_data, but takes a slice of bytes.

Panics
  • Panics if the length of bytes is not a multiple of 4.

Returns information about the entry point with the provided name. Returns None if no entry point with that name exists in the shader module or if multiple entry points with the same name exist.

Returns information about the entry point with the provided name and execution model. Returns None if no entry and execution model exists in the shader module.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

The type of the object.

Returns a reference to the object.

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.