Struct vulkano::pipeline::graphics::GraphicsPipeline
source · 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 vertex_input_state(&self) -> &VertexInputState
pub fn vertex_input_state(&self) -> &VertexInputState
Returns the vertex input state used to create this pipeline.
sourcepub fn input_assembly_state(&self) -> &InputAssemblyState
pub fn input_assembly_state(&self) -> &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_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.