|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Vulkan graphics pipeline wrapper. More...
#include <VKGraphicsPipeline.hpp>
Collaboration diagram for MayaFlux::Core::VKGraphicsPipeline:Public Member Functions | |
| VKGraphicsPipeline ()=default | |
| ~VKGraphicsPipeline () | |
| VKGraphicsPipeline (const VKGraphicsPipeline &)=delete | |
| VKGraphicsPipeline & | operator= (const VKGraphicsPipeline &)=delete |
| VKGraphicsPipeline (VKGraphicsPipeline &&) noexcept | |
| VKGraphicsPipeline & | operator= (VKGraphicsPipeline &&) noexcept |
| bool | create (vk::Device device, const GraphicsPipelineConfig &config) |
| Create graphics pipeline from configuration. | |
| void | cleanup (vk::Device device) |
| Cleanup pipeline resources. | |
| void | bind (vk::CommandBuffer cmd) |
| Bind pipeline to command buffer. | |
| void | bind_descriptor_sets (vk::CommandBuffer cmd, std::span< vk::DescriptorSet > sets, uint32_t first_set=0) |
| Bind descriptor sets. | |
| void | push_constants (vk::CommandBuffer cmd, vk::ShaderStageFlags stages, uint32_t offset, uint32_t size, const void *data) |
| Push constants. | |
| template<typename T > | |
| void | push_constants_typed (vk::CommandBuffer cmd, vk::ShaderStageFlags stages, const T &data) |
| Typed push constants. | |
| void | bind_vertex_buffers (vk::CommandBuffer cmd, uint32_t first_binding, std::span< vk::Buffer > buffers, std::span< vk::DeviceSize > offsets) |
| Bind vertex buffers. | |
| void | bind_vertex_buffer (vk::CommandBuffer cmd, vk::Buffer buffer, vk::DeviceSize offset=0, uint32_t binding=0) |
| Bind single vertex buffer (common case) | |
| void | bind_index_buffer (vk::CommandBuffer cmd, vk::Buffer buffer, vk::DeviceSize offset=0, vk::IndexType index_type=vk::IndexType::eUint32) |
| Bind index buffer. | |
| void | set_viewport (vk::CommandBuffer cmd, const vk::Viewport &viewport) |
| Set viewport (if dynamic) | |
| void | set_scissor (vk::CommandBuffer cmd, const vk::Rect2D &scissor) |
| Set scissor (if dynamic) | |
| void | set_line_width (vk::CommandBuffer cmd, float width) |
| Set line width (if dynamic) | |
| void | set_depth_bias (vk::CommandBuffer cmd, float constant_factor, float clamp, float slope_factor) |
| Set depth bias (if dynamic) | |
| void | set_blend_constants (vk::CommandBuffer cmd, const float constants[4]) |
| Set blend constants (if dynamic) | |
| void | draw (vk::CommandBuffer cmd, uint32_t vertex_count, uint32_t instance_count=1, uint32_t first_vertex=0, uint32_t first_instance=0) |
| Draw vertices. | |
| void | draw_indexed (vk::CommandBuffer cmd, uint32_t index_count, uint32_t instance_count=1, uint32_t first_index=0, int32_t vertex_offset=0, uint32_t first_instance=0) |
| Draw indexed vertices. | |
| void | draw_indirect (vk::CommandBuffer cmd, vk::Buffer buffer, vk::DeviceSize offset, uint32_t draw_count, uint32_t stride) |
| Draw indirect (dispatch from GPU buffer) | |
| void | draw_indexed_indirect (vk::CommandBuffer cmd, vk::Buffer buffer, vk::DeviceSize offset, uint32_t draw_count, uint32_t stride) |
| Draw indexed indirect. | |
| vk::Pipeline | get () const |
| vk::PipelineLayout | get_layout () const |
| bool | is_valid () const |
| const GraphicsPipelineConfig & | get_config () const |
| Get shader reflections (for introspection) | |
Private Member Functions | |
| vk::PipelineLayout | create_pipeline_layout (vk::Device device, const GraphicsPipelineConfig &config) |
| Create pipeline layout from config. | |
| bool | validate_shaders (const GraphicsPipelineConfig &config) |
| Validate shader stages. | |
| vk::PipelineVertexInputStateCreateInfo | build_vertex_input_state (const GraphicsPipelineConfig &config, std::vector< vk::VertexInputBindingDescription > &bindings, std::vector< vk::VertexInputAttributeDescription > &attributes) |
| Build vertex input state from config. | |
| vk::PipelineInputAssemblyStateCreateInfo | build_input_assembly_state (const GraphicsPipelineConfig &config) |
| Build input assembly state. | |
| vk::PipelineTessellationStateCreateInfo | build_tessellation_state (const GraphicsPipelineConfig &config) |
| Build tessellation state. | |
| vk::PipelineViewportStateCreateInfo | build_viewport_state (const GraphicsPipelineConfig &config, std::vector< vk::Viewport > &viewports, std::vector< vk::Rect2D > &scissors) |
| Build viewport state. | |
| vk::PipelineRasterizationStateCreateInfo | build_rasterization_state (const GraphicsPipelineConfig &config) |
| Build rasterization state. | |
| vk::PipelineMultisampleStateCreateInfo | build_multisample_state (const GraphicsPipelineConfig &config) |
| Build multisample state. | |
| vk::PipelineDepthStencilStateCreateInfo | build_depth_stencil_state (const GraphicsPipelineConfig &config) |
| Build depth stencil state. | |
| vk::PipelineColorBlendStateCreateInfo | build_color_blend_state (const GraphicsPipelineConfig &config, std::vector< vk::PipelineColorBlendAttachmentState > &attachments) |
| Build color blend state. | |
| vk::PipelineDynamicStateCreateInfo | build_dynamic_state (const GraphicsPipelineConfig &config) |
| Build dynamic state. | |
Private Attributes | |
| vk::Device | m_device |
| vk::Pipeline | m_pipeline |
| vk::PipelineLayout | m_layout |
| GraphicsPipelineConfig | m_config |
Vulkan graphics pipeline wrapper.
Handles the complex graphics pipeline state machine. Unlike compute pipelines, graphics pipelines require extensive fixed-function configuration.
Responsibilities:
Thread Safety:
Definition at line 226 of file VKGraphicsPipeline.hpp.