spirv_reflect

Struct ShaderModule

Source
pub struct ShaderModule { /* private fields */ }

Implementations§

Source§

impl ShaderModule

Source

pub fn load_u8_data(spv_data: &[u8]) -> Result<ShaderModule, &'static str>

Source

pub fn load_u32_data(spv_data: &[u32]) -> Result<ShaderModule, &'static str>

Source

pub fn get_code(&self) -> Vec<u32>

Source

pub fn get_generator(&self) -> ReflectGenerator

Source

pub fn get_shader_stage(&self) -> ReflectShaderStageFlags

Source

pub fn get_source_language(&self) -> SourceLanguage

Source

pub fn get_source_language_version(&self) -> u32

Source

pub fn get_source_file(&self) -> String

Source

pub fn get_source_text(&self) -> String

Source

pub fn get_spirv_execution_model(&self) -> ExecutionModel

Source

pub fn enumerate_input_variables( &self, entry_point: Option<&str>, ) -> Result<Vec<ReflectInterfaceVariable>, &'static str>

Source

pub fn enumerate_output_variables( &self, entry_point: Option<&str>, ) -> Result<Vec<ReflectInterfaceVariable>, &'static str>

Source

pub fn enumerate_descriptor_bindings( &self, entry_point: Option<&str>, ) -> Result<Vec<ReflectDescriptorBinding>, &'static str>

Source

pub fn enumerate_descriptor_sets( &self, entry_point: Option<&str>, ) -> Result<Vec<ReflectDescriptorSet>, &'static str>

Source

pub fn enumerate_push_constant_blocks( &self, entry_point: Option<&str>, ) -> Result<Vec<ReflectBlockVariable>, &'static str>

Source

pub fn enumerate_entry_points( &self, ) -> Result<Vec<ReflectEntryPoint>, &'static str>

Source

pub fn get_entry_point_name(&self) -> String

Source

pub fn change_descriptor_binding_numbers( &mut self, binding: &ReflectDescriptorBinding, new_binding: u32, new_set: Option<u32>, ) -> Result<(), &'static str>

Source

pub fn change_descriptor_set_number( &mut self, set: &ReflectDescriptorSet, new_set: u32, ) -> Result<(), &'static str>

Source

pub fn change_input_variable_location( &mut self, variable: &ReflectInterfaceVariable, new_location: u32, ) -> Result<(), &'static str>

Source

pub fn change_output_variable_location( &mut self, variable: &ReflectInterfaceVariable, new_location: u32, ) -> Result<(), &'static str>

Trait Implementations§

Source§

impl Clone for ShaderModule

Source§

fn clone(&self) -> ShaderModule

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ShaderModule

Source§

fn default() -> ShaderModule

Returns the “default value” for a type. Read more
Source§

impl Drop for ShaderModule

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.