[][src]Struct bedrock::GraphicsPipelineBuilder

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]

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]

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]

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]

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]

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]

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 fragment
  • Clamp: The maximum (or minimum) depth bias of a fragment
  • SlopeFactor: 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]

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]

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, state: VkStencilOpState) -> &mut Self[src]

Control the parameter of the stencil test

pub fn stencil_control_back(&mut self, state: VkStencilOpState) -> &mut Self[src]

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]

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]

Per target attachment states

pub fn clear_attachment_blends(&mut self) -> &mut Self[src]

Clears per-target attachment blending state

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]

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]

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]

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]

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]

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

impl<'d> GraphicsPipelineBuilder<'d>[src]

Following methods are enabled with [feature = "Implements"]

pub fn create(
    &self,
    device: &Device,
    cache: Option<&PipelineCache>
) -> Result<Pipeline>
[src]

Create a graphics pipeline

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

Trait Implementations

impl<'d> Clone for GraphicsPipelineBuilder<'d>[src]

Auto Trait Implementations

impl<'d> !RefUnwindSafe for GraphicsPipelineBuilder<'d>

impl<'d> !Send for GraphicsPipelineBuilder<'d>

impl<'d> !Sync for GraphicsPipelineBuilder<'d>

impl<'d> Unpin for GraphicsPipelineBuilder<'d>

impl<'d> !UnwindSafe for GraphicsPipelineBuilder<'d>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.