Trait gfx::pso::DataLink [−][src]
pub trait DataLink<'a>: Sized { type Init: 'a; fn new() -> Self; fn is_active(&self) -> bool; 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 { ... } }
The “link” logic portion of a PSO component. Defines the input data for the component.
Associated Types
Loading content...Required methods
fn new() -> Self
[src]
Create a new empty data link.
fn is_active(&self) -> bool
[src]
Check if this link is actually used by the shader.
Provided methods
fn link_vertex_buffer(
&mut self,
_: BufferIndex,
_: &Self::Init
) -> Option<VertexBufferDesc>
[src]
&mut self,
_: BufferIndex,
_: &Self::Init
) -> Option<VertexBufferDesc>
Attempt to link with a vertex buffer containing multiple attributes.
fn link_input(
&mut self,
_: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
[src]
&mut self,
_: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
Attempt to link with a vertex attribute.
fn link_constant_buffer<'b>(
&mut self,
_: &'b ConstantBufferVar,
_: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
[src]
&mut self,
_: &'b ConstantBufferVar,
_: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
Attempt to link with a constant buffer.
fn link_global_constant(
&mut self,
_: &ConstVar,
_: &Self::Init
) -> Option<Result<(), CompatibilityError>>
[src]
&mut self,
_: &ConstVar,
_: &Self::Init
) -> Option<Result<(), CompatibilityError>>
Attempt to link with a global constant.
fn link_output(
&mut self,
_: &OutputVar,
_: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
[src]
&mut self,
_: &OutputVar,
_: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
Attempt to link with an output render target (RTV).
fn link_depth_stencil(&mut self, _: &Self::Init) -> Option<DepthStencilDesc>
[src]
Attempt to link with a depth-stencil target (DSV).
fn link_resource_view(
&mut self,
_: &TextureVar,
_: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
[src]
&mut self,
_: &TextureVar,
_: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
Attempt to link with a shader resource (SRV).
fn link_unordered_view(
&mut self,
_: &UnorderedVar,
_: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>>
[src]
&mut self,
_: &UnorderedVar,
_: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>>
Attempt to link with an unordered access (UAV).
fn link_sampler(
&mut self,
_: &SamplerVar,
_: &Self::Init
) -> Option<SamplerDesc>
[src]
&mut self,
_: &SamplerVar,
_: &Self::Init
) -> Option<SamplerDesc>
Attempt to link with a sampler.
fn link_scissor(&mut self) -> bool
[src]
Attempt to enable scissor test.
Implementors
impl<'a> DataLink<'a> for RawConstantBuffer
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_constant_buffer<'b>(
&mut self,
cb: &'b ConstantBufferVar,
init: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
[src]
&mut self,
cb: &'b ConstantBufferVar,
init: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
impl<'a> DataLink<'a> for RawGlobal
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_global_constant(
&mut self,
var: &ConstVar,
init: &Self::Init
) -> Option<Result<(), CompatibilityError>>
[src]
&mut self,
var: &ConstVar,
init: &Self::Init
) -> Option<Result<(), CompatibilityError>>
impl<'a> DataLink<'a> for RawVertexBuffer
[src]
type Init = (&'a [(&'a str, Element<Format>)], ElemStride, InstanceRate)
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_vertex_buffer(
&mut self,
index: BufferIndex,
init: &Self::Init
) -> Option<VertexBufferDesc>
[src]
&mut self,
index: BufferIndex,
init: &Self::Init
) -> Option<VertexBufferDesc>
fn link_input(
&mut self,
at: &AttributeVar,
init: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
[src]
&mut self,
at: &AttributeVar,
init: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
impl<'a> DataLink<'a> for RawShaderResource
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_resource_view(
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
[src]
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
impl<'a> DataLink<'a> for Sampler
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_sampler(
&mut self,
var: &SamplerVar,
init: &Self::Init
) -> Option<SamplerDesc>
[src]
&mut self,
var: &SamplerVar,
init: &Self::Init
) -> Option<SamplerDesc>
impl<'a> DataLink<'a> for BlendRef
[src]
impl<'a> DataLink<'a> for RawRenderTarget
[src]
type Init = (&'a str, Format, ColorMask, Option<Blend>)
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_output(
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
[src]
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
impl<'a> DataLink<'a> for Scissor
[src]
type Init = ()
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_scissor(&mut self) -> bool
[src]
impl<'a, T> DataLink<'a> for ShaderResource<T>
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_resource_view(
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
[src]
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
impl<'a, T> DataLink<'a> for TextureSampler<T>
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_resource_view(
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
[src]
&mut self,
var: &TextureVar,
init: &Self::Init
) -> Option<Result<ResourceViewDesc, Format>>
fn link_sampler(
&mut self,
var: &SamplerVar,
init: &Self::Init
) -> Option<SamplerDesc>
[src]
&mut self,
var: &SamplerVar,
init: &Self::Init
) -> Option<SamplerDesc>
impl<'a, T> DataLink<'a> for UnorderedAccess<T>
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_unordered_view(
&mut self,
var: &UnorderedVar,
init: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>>
[src]
&mut self,
var: &UnorderedVar,
init: &Self::Init
) -> Option<Result<UnorderedViewDesc, Format>>
impl<'a, T: BlendFormat> DataLink<'a> for BlendTarget<T>
[src]
type Init = (&'a str, ColorMask, Blend)
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_output(
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
[src]
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
impl<'a, T: DepthFormat> DataLink<'a> for DepthTarget<T>
[src]
type Init = Depth
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_depth_stencil(&mut self, init: &Self::Init) -> Option<DepthStencilDesc>
[src]
impl<'a, T: DepthStencilFormat> DataLink<'a> for DepthStencilTarget<T>
[src]
type Init = (Depth, Stencil)
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_depth_stencil(&mut self, init: &Self::Init) -> Option<DepthStencilDesc>
[src]
impl<'a, T: RenderFormat> DataLink<'a> for RenderTarget<T>
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_output(
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
[src]
&mut self,
out: &OutputVar,
init: &Self::Init
) -> Option<Result<ColorTargetDesc, Format>>
impl<'a, T: StencilFormat> DataLink<'a> for StencilTarget<T>
[src]
type Init = Stencil
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_depth_stencil(&mut self, init: &Self::Init) -> Option<DepthStencilDesc>
[src]
impl<'a, T: Structure<Format>, I: ToInstanceRate + 'a> DataLink<'a> for VertexBufferCommon<T, I>
[src]
type Init = I::Init
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_vertex_buffer(
&mut self,
index: BufferIndex,
init: &Self::Init
) -> Option<VertexBufferDesc>
[src]
&mut self,
index: BufferIndex,
init: &Self::Init
) -> Option<VertexBufferDesc>
fn link_input(
&mut self,
at: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
[src]
&mut self,
at: &AttributeVar,
_: &Self::Init
) -> Option<Result<AttributeDesc, Format>>
impl<'a, T: Structure<ConstFormat>> DataLink<'a> for ConstantBuffer<T>
[src]
type Init = &'a str
fn new() -> Self
[src]
fn is_active(&self) -> bool
[src]
fn link_constant_buffer<'b>(
&mut self,
cb: &'b ConstantBufferVar,
init: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>
[src]
&mut self,
cb: &'b ConstantBufferVar,
init: &Self::Init
) -> Option<Result<ConstantBufferDesc, ElementError<&'b str>>>