Struct vulkano::shader::SpecializedShaderModule
source · pub struct SpecializedShaderModule { /* private fields */ }
Expand description
A shader module with specialization constants applied.
Implementations§
source§impl SpecializedShaderModule
impl SpecializedShaderModule
sourcepub fn new(
base_module: Arc<ShaderModule>,
specialization_info: HashMap<u32, SpecializationConstant>
) -> Result<Arc<Self>, Box<ValidationError>>
pub fn new( base_module: Arc<ShaderModule>, specialization_info: HashMap<u32, SpecializationConstant> ) -> Result<Arc<Self>, Box<ValidationError>>
Returns base_module
specialized with specialization_info
.
sourcepub fn base_module(&self) -> &Arc<ShaderModule>
pub fn base_module(&self) -> &Arc<ShaderModule>
Returns the base module, without specialization applied.
sourcepub fn specialization_info(&self) -> &HashMap<u32, SpecializationConstant>
pub fn specialization_info(&self) -> &HashMap<u32, SpecializationConstant>
Returns the specialization constants that have been applied to the module.
sourcepub fn entry_point(self: &Arc<Self>, name: &str) -> Option<EntryPoint>
pub fn entry_point(self: &Arc<Self>, name: &str) -> Option<EntryPoint>
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.
sourcepub fn entry_point_with_execution(
self: &Arc<Self>,
name: &str,
execution: ExecutionModel
) -> Option<EntryPoint>
pub fn entry_point_with_execution( self: &Arc<Self>, name: &str, execution: ExecutionModel ) -> Option<EntryPoint>
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.
sourcepub fn single_entry_point(self: &Arc<Self>) -> Option<EntryPoint>
pub fn single_entry_point(self: &Arc<Self>) -> Option<EntryPoint>
Returns information about the entry point if self
only contains a single entry point,
None
otherwise.
sourcepub fn single_entry_point_with_execution(
self: &Arc<Self>,
execution: ExecutionModel
) -> Option<EntryPoint>
pub fn single_entry_point_with_execution( self: &Arc<Self>, execution: ExecutionModel ) -> Option<EntryPoint>
Returns information about the entry point if self
only contains a single entry point
with the provided ExecutionModel
. Returns None
if no entry point was found or multiple
entry points have been found matching the provided ExecutionModel
.