pub struct GraphicsPipeline { /* private fields */ }
Expand description
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.
Implementations§
Source§impl GraphicsPipeline
impl GraphicsPipeline
Sourcepub fn new(
device: Arc<Device>,
cache: Option<Arc<PipelineCache>>,
create_info: GraphicsPipelineCreateInfo,
) -> Result<Arc<Self>, Validated<VulkanError>>
pub fn new( device: Arc<Device>, cache: Option<Arc<PipelineCache>>, create_info: GraphicsPipelineCreateInfo, ) -> Result<Arc<Self>, Validated<VulkanError>>
Creates a new GraphicsPipeline
.
Sourcepub unsafe fn from_handle(
device: Arc<Device>,
handle: Pipeline,
create_info: GraphicsPipelineCreateInfo,
) -> Arc<Self>
pub unsafe fn from_handle( device: Arc<Device>, handle: Pipeline, create_info: GraphicsPipelineCreateInfo, ) -> Arc<Self>
Creates a new GraphicsPipeline
from a raw object handle.
§Safety
handle
must be a valid Vulkan object handle created fromdevice
.create_info
must match the info used to create the object.
Sourcepub fn flags(&self) -> PipelineCreateFlags
pub fn flags(&self) -> PipelineCreateFlags
Returns the flags that the pipeline was created with.
Sourcepub fn shader_stages(&self) -> ShaderStages
pub fn shader_stages(&self) -> ShaderStages
Returns the shader stages that this pipeline contains.
Sourcepub fn vertex_input_state(&self) -> Option<&VertexInputState>
pub fn vertex_input_state(&self) -> Option<&VertexInputState>
Returns the vertex input state used to create this pipeline.
Sourcepub fn input_assembly_state(&self) -> Option<&InputAssemblyState>
pub fn input_assembly_state(&self) -> Option<&InputAssemblyState>
Returns the input assembly state used to create this pipeline.
Sourcepub fn tessellation_state(&self) -> Option<&TessellationState>
pub fn tessellation_state(&self) -> Option<&TessellationState>
Returns the tessellation state used to create this pipeline.
Sourcepub fn viewport_state(&self) -> Option<&ViewportState>
pub fn viewport_state(&self) -> Option<&ViewportState>
Returns the viewport state used to create this pipeline.
Sourcepub fn rasterization_state(&self) -> &RasterizationState
pub fn rasterization_state(&self) -> &RasterizationState
Returns the rasterization state used to create this pipeline.
Sourcepub fn multisample_state(&self) -> Option<&MultisampleState>
pub fn multisample_state(&self) -> Option<&MultisampleState>
Returns the multisample state used to create this pipeline.
Sourcepub fn depth_stencil_state(&self) -> Option<&DepthStencilState>
pub fn depth_stencil_state(&self) -> Option<&DepthStencilState>
Returns the depth/stencil state used to create this pipeline.
Sourcepub fn color_blend_state(&self) -> Option<&ColorBlendState>
pub fn color_blend_state(&self) -> Option<&ColorBlendState>
Returns the color blend state used to create this pipeline.
Sourcepub fn subpass(&self) -> &PipelineSubpassType
pub fn subpass(&self) -> &PipelineSubpassType
Returns the subpass this graphics pipeline is rendering to.
Sourcepub fn dynamic_state(&self) -> &HashSet<DynamicState>
pub fn dynamic_state(&self) -> &HashSet<DynamicState>
Returns the dynamic states of the pipeline.
Sourcepub fn discard_rectangle_state(&self) -> Option<&DiscardRectangleState>
pub fn discard_rectangle_state(&self) -> Option<&DiscardRectangleState>
Returns the discard rectangle state used to create this pipeline.
Sourcepub fn fragment_shading_rate_state(&self) -> Option<&FragmentShadingRateState>
pub fn fragment_shading_rate_state(&self) -> Option<&FragmentShadingRateState>
Returns the fragment shading rate state used to create this pipeline.
Sourcepub fn fragment_tests_stages(&self) -> Option<FragmentTestsStages>
pub fn fragment_tests_stages(&self) -> Option<FragmentTestsStages>
If the pipeline has a fragment shader, returns the fragment tests stages used.