pub struct SpecializedShaderModule { /* private fields */ }
Expand description

A shader module with specialization constants applied.

Implementations§

source§

impl SpecializedShaderModule

source

pub fn new( base_module: Arc<ShaderModule>, specialization_info: HashMap<u32, SpecializationConstant> ) -> Result<Arc<Self>, Box<ValidationError>>

Returns base_module specialized with specialization_info.

source

pub fn base_module(&self) -> &Arc<ShaderModule>

Returns the base module, without specialization applied.

source

pub fn specialization_info(&self) -> &HashMap<u32, SpecializationConstant>

Returns the specialization constants that have been applied to the module.

source

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.

source

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.

source

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.

source

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.

Trait Implementations§

source§

impl Debug for SpecializedShaderModule

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DeviceOwned for SpecializedShaderModule

source§

fn device(&self) -> &Arc<Device>

Returns the device that owns self.
source§

impl VulkanObject for SpecializedShaderModule

§

type Handle = ShaderModule

The type of the object.
source§

fn handle(&self) -> Self::Handle

Returns the raw Vulkan handle of the object.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DeviceOwnedVulkanObject for Twhere T: DeviceOwned + VulkanObject,

source§

fn set_debug_utils_object_name( &self, object_name: Option<&str> ) -> Result<(), VulkanError>

Assigns a human-readable name to the object for debugging purposes. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.