Struct bedrock::GraphicsPipelineBuilder
[−]
[src]
pub struct GraphicsPipelineBuilder<'d> { /* fields omitted */ }
Builder struct to construct a Pipeline
for graphics operations
Methods
impl<'d> GraphicsPipelineBuilder<'d>
[src]
pub fn new(layout: &'d PipelineLayout, rpsp: (&'d RenderPass, u32)) -> Self
[src]
Initialize the builder object
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Shading State and Input Configuration
pub fn vertex_processing(&mut self, vp: VertexProcessingStages<'d>) -> &mut Self
[src]
Set the vertex processing stages in this pipeline
pub fn vertex_processing_mut(&mut self) -> &mut VertexProcessingStages<'d>
[src]
Modify the vertex processing stages in this pipeline
pub fn tessellation_control_shader(
&mut self,
_shader: PipelineShader<'d>
) -> &mut Self
[src]
&mut self,
_shader: PipelineShader<'d>
) -> &mut Self
TODO: Implement Tessellation Control Description Set the tessellation control shader(hull shader) in this pipeline
pub fn tessellation_evaluation_shader(
&mut self,
_shader: PipelineShader<'d>
) -> &mut Self
[src]
&mut self,
_shader: PipelineShader<'d>
) -> &mut Self
TODO: Implement Tessellation Control Description Set the tessellation evaluation shader(domain shader) in this pipeline
pub fn patch_control_point_count(&mut self, count: u32) -> &mut Self
[src]
Number of control points per patch
pub fn tessellator_settings(
&mut self,
control: PipelineShader<'d>,
evaluation: PipelineShader<'d>,
num_control_points: u32
) -> &mut Self
[src]
&mut self,
control: PipelineShader<'d>,
evaluation: PipelineShader<'d>,
num_control_points: u32
) -> &mut Self
Set the tessellation processing state(hull/domain shaders and a number of control points)
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Viewport / Scissor State
pub unsafe fn viewports(
&mut self,
vps: DynamicArrayState<VkViewport>
) -> &mut Self
[src]
&mut self,
vps: DynamicArrayState<VkViewport>
) -> &mut Self
Safety
Application must guarantee that the number of viewports and scissors are identical
pub unsafe fn scissors(&mut self, scs: DynamicArrayState<VkRect2D>) -> &mut Self
[src]
Safety
Application must guarantee that the number of viewports and scissors are identical
pub fn fixed_viewport_scissors(
&mut self,
vps: DynamicArrayState<VkViewport>,
scissor: DynamicArrayState<VkRect2D>
) -> &mut Self
[src]
&mut self,
vps: DynamicArrayState<VkViewport>,
scissor: DynamicArrayState<VkRect2D>
) -> &mut Self
Safety way calling viewports
and scissors
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Rasterization State
pub fn depth_clamp_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether to clamp the fragment's depth values instead of clipping primitives to the z planes of the frustum,
as described in Primitive Clipping
in Vulkan Specification
pub fn rasterizer_discard_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether primitives are discarded immediately before the rasterization stage
pub fn polygon_mode(&mut self, mode: VkPolygonMode) -> &mut Self
[src]
The triangle rendering mode
pub fn cull_mode(&mut self, mode: VkCullModeFlags) -> &mut Self
[src]
The triangle facing direction used for primitive culling
pub fn front_face(&mut self, face: VkFrontFace) -> &mut Self
[src]
The front-facing triangle orientation to be used for culling
pub fn depth_bias(
&mut self,
opts: SwitchOrDynamicState<(f32, f32, f32)>
) -> &mut Self
[src]
&mut self,
opts: SwitchOrDynamicState<(f32, f32, f32)>
) -> &mut Self
Specify None
to disable to bias fragment depth values.
Tuple Member: (ConstantFactor
, Clamp
, SlopeFactor
)
ConstantFactor
: A scalar factor controlling the constant depth value added to each fragmentClamp
: The maximum (or minimum) depth bias of a fragmentSlopeFactor
: A scalar factor applied to a fragment's slope in depth bias calculations
pub fn line_width(&mut self, width: Option<f32>) -> &mut Self
[src]
The width of rasterized line segments. Specifying None
means that the lineWidth
parameter is a dynamic state.
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Multisample State
pub fn multisample_state(
&mut self,
state: Option<&'d MultisampleState>
) -> &mut Self
[src]
&mut self,
state: Option<&'d MultisampleState>
) -> &mut Self
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Depth/Stencil State
pub fn clear_depth_stencil_state(&mut self) -> &mut Self
[src]
Clear depth/stencil state
pub fn depth_test_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether depth testing is enabled
pub fn depth_write_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether depth writes are enabled, or always disabled
pub fn depth_compare_op(&mut self, op: CompareOp) -> &mut Self
[src]
The comparison operator used in the depth test
pub fn depth_test_settings(
&mut self,
compare_op: Option<CompareOp>,
write_enable: bool
) -> &mut Self
[src]
&mut self,
compare_op: Option<CompareOp>,
write_enable: bool
) -> &mut Self
Controls whether depth testing is enabled, depth writes are enabled, and the comparison operator used in the depth test
Specifying None
to compare_to
disables depth testing
pub fn depth_bounds_test_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether depth bounds testing is enabled
pub fn stencil_test_enable(&mut self, enable: bool) -> &mut Self
[src]
Controls whether stencil testing is enabled
pub fn stencil_control_front(
&mut self,
compare_op: CompareOp,
reference: u32,
compare_mask: u32,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
write_mask: u32
) -> &mut Self
[src]
&mut self,
compare_op: CompareOp,
reference: u32,
compare_mask: u32,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
write_mask: u32
) -> &mut Self
Control the parameter of the stencil test
pub fn stencil_control_back(
&mut self,
compare_op: CompareOp,
reference: u32,
compare_mask: u32,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
write_mask: u32
) -> &mut Self
[src]
&mut self,
compare_op: CompareOp,
reference: u32,
compare_mask: u32,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
write_mask: u32
) -> &mut Self
Control the parameter of the stencil test
pub fn stencil_compare_mask(&mut self, mask: Option<(u32, u32)>) -> &mut Self
[src]
Controls the parameter of the compare mask of the stencil test. Tuple ordering: (front, back).
Specifying None
means that the parameter is a dynamic state
pub fn stencil_write_mask(&mut self, mask: Option<(u32, u32)>) -> &mut Self
[src]
Controls the parameter of the write mask of the stencil test. Tuple ordering: (front, back)
Specifying None
means that the parameter is a dynamic state
pub fn stencil_reference(&mut self, mask: Option<(u32, u32)>) -> &mut Self
[src]
Controls the parameter of the reference of the stencil test. Tuple ordering: (front, back)
Specifying None
means that the parameter is a dynamic state
pub fn depth_bounds_range(&mut self, bounds: Range<f32>) -> &mut Self
[src]
The range of values used in the depth bounds test
pub fn depth_bounds(
&mut self,
bounds: SwitchOrDynamicState<Range<f32>>
) -> &mut Self
[src]
&mut self,
bounds: SwitchOrDynamicState<Range<f32>>
) -> &mut Self
Control the depth bounds test
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Color Blending
pub fn logic_op(&mut self, op: Option<LogicOp>) -> &mut Self
[src]
Which logical operation to apply. Specifying None
disables Logical Operations
pub fn add_attachment_blend(
&mut self,
blend: AttachmentColorBlendState
) -> &mut Self
[src]
&mut self,
blend: AttachmentColorBlendState
) -> &mut Self
Per target attachment states
pub fn blend_constants(&mut self, values: Option<[f32; 4]>) -> &mut Self
[src]
Array of four values used as the R, G, B, and A components of the blend constant that are used in blending, depending on the blend factor.
Specifying None
means that the blendConstants
parameter is a dynamic state
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Misc Configurations
pub fn base(&mut self, b: BasePipeline<'d>) -> &mut Self
[src]
The base pipeline handle/index to derive from
pub fn layout(&mut self, l: &'d PipelineLayout) -> &mut Self
[src]
The description of binding locations used by both the pipeline and descriptor sets used with the pipeline
pub fn render_pass(&mut self, rpo: &'d RenderPass, subpass: u32) -> &mut Self
[src]
A handle to a render pass object and the index of the subpass where this pipeline will be used
pub fn enable_optimization(&mut self, opt: bool) -> &mut Self
[src]
The created pipeline will or will not be optimized.
Disabling optimization of the pipeline may reduce the time taken to create the pipeline
pub fn allow_derivatives(&mut self, allow: bool) -> &mut Self
[src]
The pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent creation operation
impl<'d> GraphicsPipelineBuilder<'d>
[src]
Unsafe Utilities
pub unsafe fn tessellation_state_create_info(
&mut self,
state: Option<Box<VkPipelineTessellationStateCreateInfo>>
) -> &mut Self
[src]
&mut self,
state: Option<Box<VkPipelineTessellationStateCreateInfo>>
) -> &mut Self
Set the VkPipelineTessellationStateCreateInfo
structure directly
Safety
Application must guarantee these constraints:
- The lifetime of the content in the structure is valid for this builder
- The content in the structure is valid
pub unsafe fn viewport_state_create_info(
&mut self,
state: Option<Box<VkPipelineViewportStateCreateInfo>>
) -> &mut Self
[src]
&mut self,
state: Option<Box<VkPipelineViewportStateCreateInfo>>
) -> &mut Self
Set the VkPipelineViewportStateCreateInfo
structure directly.
This does not clear any dynamic states
Safety
Application must guarantee these constraints:
- The lifetime of the content in the structure is valid for this builder
- The content in the structure is valid
pub unsafe fn rasterization_state_create_info(
&mut self,
state: VkPipelineRasterizationStateCreateInfo
) -> &mut Self
[src]
&mut self,
state: VkPipelineRasterizationStateCreateInfo
) -> &mut Self
Set the VkPipelineRasterizationStateCreateInfo
structure directly.
This does not clear any dynamic states
Safety
Application must guarantee these constraints:
- The lifetime of the content in the structure is valid for this builder
- The content in the structure is valid
pub unsafe fn depth_stencil_state_create_info(
&mut self,
state: Option<Box<VkPipelineDepthStencilStateCreateInfo>>
) -> &mut Self
[src]
&mut self,
state: Option<Box<VkPipelineDepthStencilStateCreateInfo>>
) -> &mut Self
Set the VkPipelineDepthStencilStateCreateInfo
structure directly.
This does not clear any dynamic states
Safety
Application must guarantee these constraints:
- The lifetime of the content in the structure is valid for this builder
- The content in the structure is valid
pub unsafe fn color_blend_state_info(
&mut self,
state: Option<Box<VkPipelineColorBlendStateCreateInfo>>
) -> &mut Self
[src]
&mut self,
state: Option<Box<VkPipelineColorBlendStateCreateInfo>>
) -> &mut Self
Set the VkPipelineColorBlendStateCreateInfo
structure directly.
This does not clear any dynamic states
Safety
Application must guarantee these constraints:
- The lifetime of the content in the structure is valid for this builder
- The content in the structure is valid