pub struct Descriptor {
pub primitive: Primitive,
pub rasterizer: Rasterizer,
pub scissor: bool,
pub vertex_buffers: [Option<VertexBufferDesc>; 16],
pub attributes: [Option<AttributeDesc>; 16],
pub constant_buffers: [Option<ConstantBufferDesc>; 14],
pub resource_views: [Option<ResourceViewDesc>; 32],
pub unordered_views: [Option<UnorderedViewDesc>; 4],
pub samplers: [Option<SamplerDesc>; 16],
pub color_targets: [Option<ColorTargetDesc>; 4],
pub depth_stencil: Option<DepthStencilDesc>,
}Expand description
All the information surrounding a shader program that is required for PSO creation, including the formats of vertex buffers and pixel targets;
Fields§
§primitive: PrimitiveType of the primitive
rasterizer: RasterizerRasterizer setup
scissor: boolEnable scissor test
vertex_buffers: [Option<VertexBufferDesc>; 16]Vertex buffers
attributes: [Option<AttributeDesc>; 16]Vertex attributes
constant_buffers: [Option<ConstantBufferDesc>; 14]Constant buffers
resource_views: [Option<ResourceViewDesc>; 32]Shader resource views
unordered_views: [Option<UnorderedViewDesc>; 4]Unordered access views
samplers: [Option<SamplerDesc>; 16]Samplers
color_targets: [Option<ColorTargetDesc>; 4]Render target views (RTV)
depth_stencil: Option<DepthStencilDesc>Depth stencil view (DSV)
Implementations§
Source§impl Descriptor
impl Descriptor
Sourcepub fn new(primitive: Primitive, rast: Rasterizer) -> Descriptor
pub fn new(primitive: Primitive, rast: Rasterizer) -> Descriptor
Create a new empty PSO descriptor.
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§fn clone(&self) -> Descriptor
fn clone(&self) -> Descriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Descriptor
impl Debug for Descriptor
Source§impl Hash for Descriptor
impl Hash for Descriptor
Source§impl PartialEq for Descriptor
impl PartialEq for Descriptor
impl Copy for Descriptor
impl Eq for Descriptor
impl StructuralPartialEq for Descriptor
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnwindSafe for Descriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more