pub trait DataLink<'a>: Sized {
type Init: 'a;
// Required methods
fn new() -> Self;
fn is_active(&self) -> bool;
// Provided methods
fn link_vertex_buffer(
&mut self,
_: BufferIndex,
_: &Self::Init
) -> Option<VertexBufferDesc> { ... }
fn link_input(
&mut self,
_: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>> { ... }
fn link_constant_buffer<'b>(
&mut self,
_: &'b ConstantBufferVar,
_: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>> { ... }
fn link_global_constant(
&mut self,
_: &ConstVar,
_: &Self::Init
) -> Option<Result<(), CompatibilityError>> { ... }
fn link_output(
&mut self,
_: &OutputVar,
_: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>> { ... }
fn link_depth_stencil(&mut self, _: &Self::Init) -> Option<DepthStencilDesc> { ... }
fn link_resource_view(
&mut self,
_: &TextureVar,
_: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>> { ... }
fn link_unordered_view(
&mut self,
_: &UnorderedVar,
_: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>> { ... }
fn link_sampler(
&mut self,
_: &SamplerVar,
_: &Self::Init
) -> Option<SamplerDesc> { ... }
fn link_scissor(&mut self) -> bool { ... }
}
Expand description
The “link” logic portion of a PSO component. Defines the input data for the component.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn link_vertex_buffer(
&mut self,
_: BufferIndex,
_: &Self::Init
) -> Option<VertexBufferDesc>
fn link_vertex_buffer( &mut self, _: BufferIndex, _: &Self::Init ) -> Option<VertexBufferDesc>
Attempt to link with a vertex buffer containing multiple attributes.
sourcefn link_input(
&mut self,
_: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
fn link_input( &mut self, _: &AttributeVar, _: &Self::Init ) -> Option<Result<AttributeDesc, Format>>
Attempt to link with a vertex attribute.
sourcefn link_constant_buffer<'b>(
&mut self,
_: &'b ConstantBufferVar,
_: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
fn link_constant_buffer<'b>( &mut self, _: &'b ConstantBufferVar, _: &Self::Init ) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
Attempt to link with a constant buffer.
sourcefn link_global_constant(
&mut self,
_: &ConstVar,
_: &Self::Init
) -> Option<Result<(), CompatibilityError>>
fn link_global_constant( &mut self, _: &ConstVar, _: &Self::Init ) -> Option<Result<(), CompatibilityError>>
Attempt to link with a global constant.
sourcefn link_output(
&mut self,
_: &OutputVar,
_: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
fn link_output( &mut self, _: &OutputVar, _: &Self::Init ) -> Option<Result<ColorTargetDesc, Format>>
Attempt to link with an output render target (RTV).
sourcefn link_depth_stencil(&mut self, _: &Self::Init) -> Option<DepthStencilDesc>
fn link_depth_stencil(&mut self, _: &Self::Init) -> Option<DepthStencilDesc>
Attempt to link with a depth-stencil target (DSV).
sourcefn link_resource_view(
&mut self,
_: &TextureVar,
_: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
fn link_resource_view( &mut self, _: &TextureVar, _: &Self::Init ) -> Option<Result<ResourceViewDesc, Format>>
Attempt to link with a shader resource (SRV).
sourcefn link_unordered_view(
&mut self,
_: &UnorderedVar,
_: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>>
fn link_unordered_view( &mut self, _: &UnorderedVar, _: &Self::Init ) -> Option<Result<UnorderedViewDesc, Format>>
Attempt to link with an unordered access (UAV).
sourcefn link_sampler(&mut self, _: &SamplerVar, _: &Self::Init) -> Option<SamplerDesc>
fn link_sampler(&mut self, _: &SamplerVar, _: &Self::Init) -> Option<SamplerDesc>
Attempt to link with a sampler.
sourcefn link_scissor(&mut self) -> bool
fn link_scissor(&mut self) -> bool
Attempt to enable scissor test.