HlslCompiler

Struct HlslCompiler 

Source
pub struct HlslCompiler<'a> { /* private fields */ }
Available on crate feature hlsl only.
Expand description

High Level Language compiler.

Implementations§

Source§

impl<'a> HlslCompiler<'a>

Source

pub fn new(ctx: &'a mut Context, words: &[u32]) -> Result<Self>

Source

pub fn into_generic(self) -> GenericCompiler<'a>

Source

pub fn shader_model_semver(self, version: &Version) -> Result<Self>

Source

pub fn shader_model(self, major: u32, minor: u32) -> Result<Self>

Source

pub fn point_size_compat(self, point_size_compat: bool) -> Result<Self>

Source

pub fn point_coord_compat(self, point_coord_compat: bool) -> Result<Self>

Source

pub fn support_nonzero_base_vertex_base_instance( self, support_nonzero_base_vertex_base_instance: bool, ) -> Result<Self>

Source

pub fn force_storage_buffer_as_uav( self, force_storage_buffer_as_uav: bool, ) -> Result<Self>

Source

pub fn nonwritable_uav_texture_as_srv( self, nonwritable_uav_texture_as_srv: bool, ) -> Result<Self>

Source

pub fn enable_16bit_types(self, enable_16bit_types: bool) -> Result<Self>

Source

pub fn flatten_matrix_vertex_input_semantics( self, flatten_matrix_vertex_input_semantics: bool, ) -> Result<Self>

Trait Implementations§

Source§

impl<'a> Compiler<'a> for HlslCompiler<'a>

Source§

fn raw_compile(self) -> Result<&'a CStr>

Compiles the program with the specified options, returning a reference to the context’s resulting C string. Read more
Source§

fn set_uint(self, option: spvc_compiler_option, value: c_uint) -> Result<Self>

Sets the compiler’s option property to the specified integer value.
Source§

fn set_bool(self, option: spvc_compiler_option, value: bool) -> Result<Self>

Sets the compiler’s option property to the specified boolean value.
Source§

fn force_temporary(self, force_temporary: bool) -> Result<Self>

Source§

fn flatten_multidimensional_arrays( self, flatten_multidimensional_arrays: bool, ) -> Result<Self>

Source§

fn fixup_depth_convention(self, fixup_depth_convention: bool) -> Result<Self>

Source§

fn flip_vertex_y(self, flip_vertex_y: bool) -> Result<Self>

Source§

fn emit_line_directives(self, emit_line_directives: bool) -> Result<Self>

Source§

fn enable_storage_image_qualifier_deduction( self, enable_storage_image_qualifier_deduction: bool, ) -> Result<Self>

Source§

fn force_zero_initialized_variables( self, force_zero_initialized_variables: bool, ) -> Result<Self>

Source§

fn compile(self) -> Result<String>

Compiles the program with the specified options, returning a UTF-8 encoded copy of the result. Read more
Source§

impl<'a> From<HlslCompiler<'a>> for GenericCompiler<'a>

Source§

fn from(value: HlslCompiler<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for HlslCompiler<'a>

§

impl<'a> !RefUnwindSafe for HlslCompiler<'a>

§

impl<'a> Send for HlslCompiler<'a>

§

impl<'a> Sync for HlslCompiler<'a>

§

impl<'a> Unpin for HlslCompiler<'a>

§

impl<'a> !UnwindSafe for HlslCompiler<'a>

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> 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, 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.