Module vulkano::shader

source ·
Expand description

A program that is run on the device.

In Vulkan, shaders are grouped in shader modules. Each shader module is built from SPIR-V code and can contain one or more entry points. Note that for the moment the official GLSL-to-SPIR-V compiler does not support multiple entry points.

The vulkano library can parse and introspect SPIR-V code, but it does not fully validate the code. You are encouraged to use the vulkano-shaders crate that will generate Rust code that wraps around vulkano’s shaders API.


Extraction of information from SPIR-V modules, that is needed by the rest of Vulkano.
Parsing and analysis utilities for SPIR-V shader binaries.


The requirements imposed by a shader on a descriptor within a descriptor set layout, and on any resource that is bound to that descriptor.
Represents a shader entry point in a shader module.
The information associated with a single entry point in a shader.
The mode in which a geometry shader executes.
Type that contains the definition of an interface between two shader stages, or between the outside and a shader stage.
Entry of a shader interface definition.
The type of a variable in a shader interface.
Contains SPIR-V code with one or more entry points.
A set of shader stages.
The requirements imposed by a shader on a specialization constant.
Describes an individual constant to set in the shader. Also a field in the struct.


An error that can be returned when trying to create the intersection of two DescriptorRequirements values.
The input primitive type that is expected by a geometry shader.
Error that can happen when creating a new shader module.
The mode in which a shader executes. This includes both information about the shader type/stage, and additional data relevant to particular shader types.
Error that can happen when the interface mismatches between two shader stages.
The numeric base type of a shader variable.
A single shader stage.
Error that can happen when checking whether a shader is supported by a device.


Trait for types that contain specialization data for shaders.