Struct vulkano::pipeline::GraphicsPipeline
[−]
[src]
pub struct GraphicsPipeline<VertexDefinition, Layout, RenderP> { /* fields omitted */ }
Defines how the implementation should perform a draw operation.
This object contains the shaders and the various fixed states that describe how the implementation should perform the various operations needed by a draw command.
Methods
impl GraphicsPipeline<(), (), ()>
[src]
fn start<'a>(
) -> GraphicsPipelineBuilder<'a, SingleBufferDefinition<()>, (), (), (), (), (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, ()>
) -> GraphicsPipelineBuilder<'a, SingleBufferDefinition<()>, (), (), (), (), (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, (), EmptyShaderInterfaceDef, EmptyShaderInterfaceDef, EmptyPipelineDesc, ()>
Starts the building process of a graphics pipeline. Returns a builder object that you can fill with the various parameters.
impl<Vdef, Rp> GraphicsPipeline<Vdef, (), Rp> where
Rp: RenderPassAbstract,
[src]
Rp: RenderPassAbstract,
fn new<'a, Vsp, Vi, Vo, Vl, Fs, Fi, Fo, Fl>(
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<Vl, Fl>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Fi: ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Vo: ShaderInterfaceDef,
Rp: RenderPassSubpassInterface<Fo>,
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<Vl, Fl>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Fi: ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Vo: ShaderInterfaceDef,
Rp: RenderPassSubpassInterface<Fo>,
Builds a new graphics pipeline object.
See the documentation of GraphicsPipelineCreateInfo
for more info about the parameter.
In order to avoid compiler errors caused by not being able to infer template parameters, this function assumes that you will only use a vertex shader and a fragment shader. See the other constructors for other possibilities.
fn with_geometry_shader<'a, Vsp, Vi, Vo, Vl, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl>(
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<PipelineLayoutDescUnion<Vl, Fl>, Gl>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Gl: PipelineLayoutDescNames + Clone,
Gi: ShaderInterfaceDefMatch<Vo>,
Vo: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Go> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Go: ShaderInterfaceDef,
Rp: RenderPassSubpassInterface<Fo>,
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, (), (), (), EmptyPipelineDesc, (), (), (), EmptyPipelineDesc, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<PipelineLayoutDescUnion<Vl, Fl>, Gl>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Gl: PipelineLayoutDescNames + Clone,
Gi: ShaderInterfaceDefMatch<Vo>,
Vo: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Go> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Go: ShaderInterfaceDef,
Rp: RenderPassSubpassInterface<Fo>,
Builds a new graphics pipeline object with a geometry shader.
See the documentation of GraphicsPipelineCreateInfo
for more info about the parameter.
In order to avoid compiler errors caused by not being able to infer template parameters, this function assumes that you will use a vertex shader, a geometry shader and a fragment shader. See the other constructors for other possibilities.
fn with_tessellation<'a, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, Fs, Fi, Fo, Fl>(
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, (), (), (), EmptyPipelineDesc, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<PipelineLayoutDescUnion<PipelineLayoutDescUnion<Vl, Fl>, Tcl>, Tel>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Tcl: PipelineLayoutDescNames + Clone,
Tel: PipelineLayoutDescNames + Clone,
Tci: ShaderInterfaceDefMatch<Vo>,
Tei: ShaderInterfaceDefMatch<Tco>,
Vo: ShaderInterfaceDef,
Tco: ShaderInterfaceDef,
Teo: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Rp: RenderPassAbstract + RenderPassSubpassInterface<Fo>,
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, (), (), (), EmptyPipelineDesc, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, PipelineLayout<PipelineLayoutDescUnion<PipelineLayoutDescUnion<PipelineLayoutDescUnion<Vl, Fl>, Tcl>, Tel>>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone,
Fl: PipelineLayoutDescNames + Clone,
Tcl: PipelineLayoutDescNames + Clone,
Tel: PipelineLayoutDescNames + Clone,
Tci: ShaderInterfaceDefMatch<Vo>,
Tei: ShaderInterfaceDefMatch<Tco>,
Vo: ShaderInterfaceDef,
Tco: ShaderInterfaceDef,
Teo: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Rp: RenderPassAbstract + RenderPassSubpassInterface<Fo>,
Builds a new graphics pipeline object with tessellation shaders.
See the documentation of GraphicsPipelineCreateInfo
for more info about the parameter.
In order to avoid compiler errors caused by not being able to infer template parameters, this function assumes that you will use a vertex shader, a tessellation control shader, a tessellation evaluation shader and a fragment shader. See the other constructors for other possibilities.
fn with_tessellation_and_geometry<'a, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl>(
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, Box<PipelineLayoutAbstract + Send + Sync>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Fl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tcl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tel: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Gl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tci: ShaderInterfaceDefMatch<Vo>,
Tei: ShaderInterfaceDefMatch<Tco>,
Gi: ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Vo: ShaderInterfaceDef,
Tco: ShaderInterfaceDef,
Teo: ShaderInterfaceDef,
Go: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Go> + ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Rp: RenderPassAbstract + RenderPassSubpassInterface<Fo>,
device: Arc<Device>,
params: GraphicsPipelineParams<'a, Vdef, Vsp, Vi, Vo, Vl, Tcs, Tci, Tco, Tcl, Tes, Tei, Teo, Tel, Gsp, Gi, Go, Gl, Fs, Fi, Fo, Fl, Rp>
) -> Result<GraphicsPipeline<Vdef, Box<PipelineLayoutAbstract + Send + Sync>, Rp>, GraphicsPipelineCreationError> where
Vdef: VertexDefinition<Vi>,
Vl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Fl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tcl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tel: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Gl: PipelineLayoutDescNames + Clone + 'static + Send + Sync,
Tci: ShaderInterfaceDefMatch<Vo>,
Tei: ShaderInterfaceDefMatch<Tco>,
Gi: ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Vo: ShaderInterfaceDef,
Tco: ShaderInterfaceDef,
Teo: ShaderInterfaceDef,
Go: ShaderInterfaceDef,
Fi: ShaderInterfaceDefMatch<Go> + ShaderInterfaceDefMatch<Teo> + ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Rp: RenderPassAbstract + RenderPassSubpassInterface<Fo>,
Builds a new graphics pipeline object with a geometry and tessellation shaders.
See the documentation of GraphicsPipelineCreateInfo
for more info about the parameter.
In order to avoid compiler errors caused by not being able to infer template parameters, this function assumes that you will use a vertex shader, a tessellation control shader, a tessellation evaluation shader, a geometry shader and a fragment shader. See the other constructors for other possibilities.
impl<Mv, L, Rp> GraphicsPipeline<Mv, L, Rp>
[src]
fn vertex_definition(&self) -> &Mv
Returns the vertex definition used in the constructor.
fn device(&self) -> &Arc<Device>
Returns the device used to create this pipeline.
impl<Mv, L, Rp> GraphicsPipeline<Mv, L, Rp> where
L: PipelineLayoutAbstract,
[src]
L: PipelineLayoutAbstract,
fn layout(&self) -> &L
Returns the pipeline layout used in the constructor.
impl<Mv, L, Rp> GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassDesc,
[src]
Rp: RenderPassDesc,
impl<Mv, L, Rp> GraphicsPipeline<Mv, L, Rp>
[src]
fn render_pass(&self) -> &Rp
Returns the render pass used in the constructor.
fn has_dynamic_line_width(&self) -> bool
Returns true if the line width used by this pipeline is dynamic.
fn num_viewports(&self) -> u32
Returns the number of viewports and scissors of this pipeline.
fn has_dynamic_viewports(&self) -> bool
Returns true if the viewports used by this pipeline are dynamic.
fn has_dynamic_scissors(&self) -> bool
Returns true if the scissors used by this pipeline are dynamic.
fn has_dynamic_depth_bounds(&self) -> bool
Returns true if the depth bounds used by this pipeline are dynamic.
fn has_dynamic_stencil_compare_mask(&self) -> bool
Returns true if the stencil compare masks used by this pipeline are dynamic.
fn has_dynamic_stencil_write_mask(&self) -> bool
Returns true if the stencil write masks used by this pipeline are dynamic.
fn has_dynamic_stencil_reference(&self) -> bool
Returns true if the stencil references used by this pipeline are dynamic.
Trait Implementations
impl<Mv, L, Rp> PipelineLayoutAbstract for GraphicsPipeline<Mv, L, Rp> where
L: PipelineLayoutAbstract,
[src]
L: PipelineLayoutAbstract,
fn sys(&self) -> PipelineLayoutSys
Returns an opaque object that allows internal access to the pipeline layout. Read more
fn descriptor_set_layout(
&self,
index: usize
) -> Option<&Arc<UnsafeDescriptorSetLayout>>
&self,
index: usize
) -> Option<&Arc<UnsafeDescriptorSetLayout>>
Returns the UnsafeDescriptorSetLayout
object of the specified set index. Read more
impl<Mv, L, Rp> PipelineLayoutDesc for GraphicsPipeline<Mv, L, Rp> where
L: PipelineLayoutDesc,
[src]
L: PipelineLayoutDesc,
fn num_sets(&self) -> usize
Returns the number of sets in the layout. Includes possibly empty sets. Read more
fn num_bindings_in_set(&self, set: usize) -> Option<usize>
Returns the number of descriptors in the set. Includes possibly empty descriptors. Read more
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>
Returns the descriptor for the given binding of the given set. Read more
fn num_push_constants_ranges(&self) -> usize
Returns the number of push constant ranges of the layout.
fn push_constants_range(&self, num: usize) -> Option<PipelineLayoutDescPcRange>
Returns a description of the given push constants range. Read more
fn provided_set_layout(
&self,
set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
&self,
set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
If the PipelineLayoutDesc
implementation is able to provide an existing UnsafeDescriptorSetLayout
for a given set, it can do so by returning it here. Read more
fn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T> where
Self: Sized,
Self: Sized,
Builds the union of this layout and another.
fn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError> where
Self: Sized,
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError> where
Self: Sized,
Turns the layout description into a PipelineLayout
object that can be used by Vulkan. Read more
impl<Mv, L, Rp> PipelineLayoutDescNames for GraphicsPipeline<Mv, L, Rp> where
L: PipelineLayoutDescNames,
[src]
L: PipelineLayoutDescNames,
fn descriptor_by_name(&self, name: &str) -> Option<(usize, usize)>
Returns the set ID and descriptor ID within set of the descriptor with the given name. Read more
impl<Mv, L, Rp> DeviceOwned for GraphicsPipeline<Mv, L, Rp>
[src]
impl<Mv, L, Rp> Debug for GraphicsPipeline<Mv, L, Rp>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl<Mv, L, Rp> RenderPassAbstract for GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassAbstract,
[src]
Rp: RenderPassAbstract,
fn inner(&self) -> RenderPassSys
Returns an opaque object representing the render pass' internals. Read more
impl<Mv, L, Rp> RenderPassDesc for GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassDesc,
[src]
Rp: RenderPassDesc,
fn num_attachments(&self) -> usize
Returns the number of attachments of the render pass.
fn attachment_desc(&self, num: usize) -> Option<LayoutAttachmentDescription>
Returns the description of an attachment. Read more
fn num_subpasses(&self) -> usize
Returns the number of subpasses of the render pass.
fn subpass_desc(&self, num: usize) -> Option<LayoutPassDescription>
Returns the description of a subpass. Read more
fn num_dependencies(&self) -> usize
Returns the number of dependencies of the render pass.
fn dependency_desc(&self, num: usize) -> Option<LayoutPassDependencyDescription>
Returns the description of a dependency. Read more
fn attachment_descs(&self) -> RenderPassDescAttachments<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of attachments.
fn subpass_descs(&self) -> RenderPassDescSubpasses<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of subpasses.
fn dependency_descs(&self) -> RenderPassDescDependencies<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of dependencies.
fn is_compatible_with<T: ?Sized>(&self, other: &T) -> bool where
Self: Sized,
T: RenderPassDesc,
Self: Sized,
T: RenderPassDesc,
Returns true if this render pass is compatible with another render pass. Read more
fn build_render_pass(
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
Builds a render pass from this description. Read more
fn num_color_attachments(&self, subpass: u32) -> Option<u32>
Returns the number of color attachments of a subpass. Returns None
if out of range.
fn num_samples(&self, subpass: u32) -> Option<u32>
Returns the number of samples of the attachments of a subpass. Returns None
if out of range or if the subpass has no attachment. TODO: return an enum instead? Read more
fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
Returns a tuple whose first element is true
if there's a depth attachment, and whose second element is true
if there's a stencil attachment. Returns None
if out of range. Read more
fn has_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment.
fn has_writable_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal
. Read more
fn has_stencil(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a stencil attachment or a depth-stencil attachment.
fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a stencil attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal
. Read more
impl<C, Mv, L, Rp> RenderPassDescClearValues<C> for GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassDescClearValues<C>,
[src]
Rp: RenderPassDescClearValues<C>,
fn convert_clear_values(&self, vals: C) -> Box<Iterator<Item = ClearValue>>
Decodes a C
into a list of clear values where each element corresponds to an attachment. The size of the returned iterator must be the same as the number of attachments. Read more
impl<Mv, L, Rp> VulkanObject for GraphicsPipeline<Mv, L, Rp>
[src]
type Object = Pipeline
The type of the object.
fn internal_object(&self) -> Pipeline
Returns a reference to the object.
impl<Mv, L, Rp> GraphicsPipelineAbstract for GraphicsPipeline<Mv, L, Rp> where
L: PipelineLayoutAbstract,
Rp: RenderPassAbstract,
Mv: VertexSource<Vec<Arc<BufferAccess + Send + Sync>>>,
[src]
L: PipelineLayoutAbstract,
Rp: RenderPassAbstract,
Mv: VertexSource<Vec<Arc<BufferAccess + Send + Sync>>>,
fn inner(&self) -> GraphicsPipelineSys
Returns an opaque object that represents the inside of the graphics pipeline.
fn subpass_index(&self) -> u32
Returns the index of the subpass this graphics pipeline is rendering to.
fn has_dynamic_line_width(&self) -> bool
Returns true if the line width used by this pipeline is dynamic.
fn num_viewports(&self) -> u32
Returns the number of viewports and scissors of this pipeline.
fn has_dynamic_viewports(&self) -> bool
Returns true if the viewports used by this pipeline are dynamic.
fn has_dynamic_scissors(&self) -> bool
Returns true if the scissors used by this pipeline are dynamic.
fn has_dynamic_depth_bounds(&self) -> bool
Returns true if the depth bounds used by this pipeline are dynamic.
fn has_dynamic_stencil_compare_mask(&self) -> bool
Returns true if the stencil compare masks used by this pipeline are dynamic.
fn has_dynamic_stencil_write_mask(&self) -> bool
Returns true if the stencil write masks used by this pipeline are dynamic.
fn has_dynamic_stencil_reference(&self) -> bool
Returns true if the stencil references used by this pipeline are dynamic.
fn subpass(self) -> Subpass<Self> where
Self: Sized,
Self: Sized,
Returns the subpass this graphics pipeline is rendering to.
impl<Mv, L, Rp, I> VertexDefinition<I> for GraphicsPipeline<Mv, L, Rp> where
Mv: VertexDefinition<I>,
[src]
Mv: VertexDefinition<I>,
type BuffersIter = <Mv as VertexDefinition<I>>::BuffersIter
Iterator that returns the offset, the stride (in bytes) and input rate of each buffer.
type AttribsIter = <Mv as VertexDefinition<I>>::AttribsIter
Iterator that returns the attribute location, buffer id, and infos.
fn definition(
&self,
interface: &I
) -> Result<(Self::BuffersIter, Self::AttribsIter), IncompatibleVertexDefinitionError>
&self,
interface: &I
) -> Result<(Self::BuffersIter, Self::AttribsIter), IncompatibleVertexDefinitionError>
Builds the vertex definition to use to link this definition to a vertex shader's input interface. Read more
impl<Mv, L, Rp, S> VertexSource<S> for GraphicsPipeline<Mv, L, Rp> where
Mv: VertexSource<S>,
[src]
Mv: VertexSource<S>,