26 std::vector<Core::VertexBinding>,
27 std::vector<Core::VertexAttribute>>
28 translate_semantic_layout(
const Kakshya::VertexLayout& layout)
35 "Translated semantic vertex layout: {} bindings, {} attributes",
36 vk_bindings.size(), vk_attributes.size());
38 return { vk_bindings, vk_attributes };
51 "RenderFlow already initialized (static flag)");
57 "RenderFlow already initialized");
64 "ShaderFoundry must be initialized before RenderFlow");
73 "DisplayService not found in BackendRegistry");
80 "RenderFlow initialized");
91 "RenderFlow stopped");
101 "Shutting down RenderFlow...");
105 "Cannot shutdown RenderFlow: ShaderFoundry not initialized");
113 "Cannot shutdown RenderFlow: Vulkan device is null");
127 "RenderFlow shutdown complete");
140 return vk::PrimitiveTopology::ePointList;
142 return vk::PrimitiveTopology::eLineList;
144 return vk::PrimitiveTopology::eLineStrip;
146 return vk::PrimitiveTopology::eTriangleList;
148 return vk::PrimitiveTopology::eTriangleStrip;
150 return vk::PrimitiveTopology::eTriangleFan;
152 return vk::PrimitiveTopology::eTriangleList;
156 vk::PolygonMode to_vk_polygon_mode(
PolygonMode mode)
160 return vk::PolygonMode::eFill;
162 return vk::PolygonMode::eLine;
164 return vk::PolygonMode::ePoint;
166 return vk::PolygonMode::eFill;
170 vk::CullModeFlags to_vk_cull_mode(
CullMode mode)
174 return vk::CullModeFlagBits::eNone;
176 return vk::CullModeFlagBits::eFront;
178 return vk::CullModeFlagBits::eBack;
180 return vk::CullModeFlagBits::eFrontAndBack;
182 return vk::CullModeFlagBits::eBack;
186 vk::CompareOp to_vk_compare_op(
CompareOp op)
190 return vk::CompareOp::eNever;
192 return vk::CompareOp::eLess;
194 return vk::CompareOp::eEqual;
196 return vk::CompareOp::eLessOrEqual;
198 return vk::CompareOp::eGreater;
200 return vk::CompareOp::eNotEqual;
202 return vk::CompareOp::eGreaterOrEqual;
204 return vk::CompareOp::eAlways;
206 return vk::CompareOp::eLess;
210 vk::BlendFactor to_vk_blend_factor(
BlendFactor factor)
214 return vk::BlendFactor::eZero;
216 return vk::BlendFactor::eOne;
218 return vk::BlendFactor::eSrcColor;
220 return vk::BlendFactor::eOneMinusSrcColor;
222 return vk::BlendFactor::eDstColor;
224 return vk::BlendFactor::eOneMinusDstColor;
226 return vk::BlendFactor::eSrcAlpha;
228 return vk::BlendFactor::eOneMinusSrcAlpha;
230 return vk::BlendFactor::eDstAlpha;
232 return vk::BlendFactor::eOneMinusDstAlpha;
234 return vk::BlendFactor::eOne;
238 vk::BlendOp to_vk_blend_op(
BlendOp op)
242 return vk::BlendOp::eAdd;
244 return vk::BlendOp::eSubtract;
246 return vk::BlendOp::eReverseSubtract;
248 return vk::BlendOp::eMin;
250 return vk::BlendOp::eMax;
252 return vk::BlendOp::eAdd;
263 const std::vector<vk::Format>& color_formats,
264 vk::Format depth_format)
268 "RenderFlow not initialized");
274 "Pipeline requires either mesh shader or vertex shader");
278 if (color_formats.empty()) {
280 "At least one color format required for dynamic rendering pipeline");
311 "Pipeline using semantic VertexLayout ({} vertices, {} attributes)",
315 auto [vk_bindings, vk_attributes] = translate_semantic_layout(
324 "Pipeline using explicit vertex config ({} bindings, {} attributes)",
329 vk_binding.
binding = binding.binding;
330 vk_binding.stride = binding.stride;
331 vk_binding.input_rate = binding.per_instance ? vk::VertexInputRate::eInstance : vk::VertexInputRate::eVertex;
338 vk_attr.binding = attr.binding;
339 vk_attr.format = attr.format;
340 vk_attr.offset = attr.offset;
347 "Pipeline will use shader reflection for vertex input");
378 std::vector<vk::DescriptorSetLayout> layouts;
379 vk::DescriptorSetLayout state_vt_layout {};
382 std::vector<vk::DescriptorSetLayoutBinding> set0_bindings;
384 vk::DescriptorSetLayoutBinding vt_b;
386 vt_b.descriptorType = vk::DescriptorType::eUniformBuffer;
387 vt_b.descriptorCount = 1;
388 vt_b.stageFlags = vk::ShaderStageFlagBits::eVertex;
389 set0_bindings.push_back(vt_b);
393 if (binding.set == 0 && binding.binding != 0) {
394 vk::DescriptorSetLayoutBinding vk_b;
395 vk_b.binding = binding.binding;
396 vk_b.descriptorType = binding.type;
397 vk_b.descriptorCount = binding.count > 0 ? binding.count : 1;
398 vk_b.stageFlags = vk::ShaderStageFlagBits::eVertex
399 | vk::ShaderStageFlagBits::eFragment;
400 set0_bindings.push_back(vk_b);
405 vk::DescriptorSetLayoutCreateInfo layout_info;
406 layout_info.bindingCount =
static_cast<uint32_t
>(set0_bindings.size());
407 layout_info.pBindings = set0_bindings.data();
409 layouts.push_back(vt_layout);
410 state_vt_layout = vt_layout;
414 bool all_set_zero = std::ranges::all_of(desc_set,
415 [](
const auto&
b) {
return b.set == 0; });
419 std::vector<vk::DescriptorSetLayoutBinding> bindings;
420 for (
const auto& binding : desc_set) {
421 if (binding.set == 0)
423 vk::DescriptorSetLayoutBinding vk_b;
424 vk_b.binding = binding.binding;
425 vk_b.descriptorType = binding.type;
426 vk_b.descriptorCount = binding.count > 0 ? binding.count : 1;
427 vk_b.stageFlags = vk::ShaderStageFlagBits::eVertex
428 | vk::ShaderStageFlagBits::eFragment;
429 bindings.push_back(vk_b);
432 if (bindings.empty())
435 vk::DescriptorSetLayoutCreateInfo layout_info;
436 layout_info.bindingCount =
static_cast<uint32_t
>(bindings.size());
437 layout_info.pBindings = bindings.data();
444 vk::ShaderStageFlags push_constant_stages;
447 push_constant_stages = vk::ShaderStageFlagBits::eMeshEXT;
449 push_constant_stages |= vk::ShaderStageFlagBits::eTaskEXT;
452 push_constant_stages |= vk::ShaderStageFlagBits::eFragment;
455 push_constant_stages = vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment;
457 push_constant_stages |= vk::ShaderStageFlagBits::eGeometry;
460 push_constant_stages |= vk::ShaderStageFlagBits::eTessellationControl;
463 push_constant_stages |= vk::ShaderStageFlagBits::eTessellationEvaluation;
468 vk::PushConstantRange range;
469 range.stageFlags = push_constant_stages;
479 vk::DynamicState::eViewport,
480 vk::DynamicState::eScissor
483 auto pipeline = std::make_shared<Core::VKGraphicsPipeline>();
486 "Failed to create VKGraphicsPipeline for dynamic rendering");
488 for (
auto layout : layouts) {
500 state.
layout = pipeline->get_layout();
505 "Dynamic rendering pipeline created (ID: {}, {} color attachments)",
506 pipeline_id, color_formats.size());
520 if (it->second.pipeline) {
521 it->second.pipeline->cleanup(device);
524 if (it->second.layout) {
525 device.destroyPipelineLayout(it->second.layout);
528 for (
auto layout : it->second.layouts) {
530 device.destroyDescriptorSetLayout(layout);
537 "Destroyed graphics pipeline (ID: {})", pipeline_id);
545 if (state.pipeline) {
546 state.pipeline->cleanup(device);
549 for (
auto layout : state.layouts) {
551 device.destroyDescriptorSetLayout(layout);
558 "Cleaned up all graphics pipelines");
568 return it->second.view_transform_layout;
577 const std::shared_ptr<Core::Window>& window,
578 vk::Image swapchain_image,
579 const std::array<float, 4>& clear_color,
580 vk::ImageView depth_image_view)
585 "Invalid command buffer ID: {}", cmd_id);
591 "Cannot begin rendering for null window");
595 if (!swapchain_image) {
597 "Cannot begin rendering with null swapchain image");
604 "Window '{}' not registered for rendering. "
605 "Call register_window_for_rendering() first.",
606 window->get_create_info().title);
609 it->second.swapchain_image = swapchain_image;
612 uint32_t
width = 0, height = 0;
615 if (
width == 0 || height == 0) {
617 "Invalid swapchain extent for window '{}': {}x{}",
618 window->get_create_info().title,
width, height);
625 "Failed to get image view for window '{}'",
626 window->get_create_info().title);
630 vk::ImageMemoryBarrier pre_barrier {};
631 pre_barrier.oldLayout = vk::ImageLayout::eUndefined;
632 pre_barrier.newLayout = vk::ImageLayout::eColorAttachmentOptimal;
633 pre_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
634 pre_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
635 pre_barrier.image = swapchain_image;
636 pre_barrier.subresourceRange.aspectMask = vk::ImageAspectFlagBits::eColor;
637 pre_barrier.subresourceRange.baseMipLevel = 0;
638 pre_barrier.subresourceRange.levelCount = 1;
639 pre_barrier.subresourceRange.baseArrayLayer = 0;
640 pre_barrier.subresourceRange.layerCount = 1;
641 pre_barrier.srcAccessMask = vk::AccessFlagBits::eNone;
642 pre_barrier.dstAccessMask = vk::AccessFlagBits::eColorAttachmentWrite;
645 vk::PipelineStageFlagBits::eTopOfPipe,
646 vk::PipelineStageFlagBits::eColorAttachmentOutput,
647 vk::DependencyFlags {},
652 vk::RenderingAttachmentInfo color_attachment {};
653 color_attachment.sType = vk::StructureType::eRenderingAttachmentInfo;
654 color_attachment.pNext =
nullptr;
655 color_attachment.imageView = image_view;
656 color_attachment.imageLayout = vk::ImageLayout::eColorAttachmentOptimal;
657 color_attachment.resolveMode = vk::ResolveModeFlagBits::eNone;
658 color_attachment.resolveImageView =
nullptr;
659 color_attachment.resolveImageLayout = vk::ImageLayout::eUndefined;
660 color_attachment.loadOp = vk::AttachmentLoadOp::eClear;
661 color_attachment.storeOp = vk::AttachmentStoreOp::eStore;
664 color_attachment.clearValue.color = vk::ClearColorValue(clear_color);
666 color_attachment.clearValue.color = vk::ClearColorValue(window->get_create_info().clear_color);
669 vk::RenderingAttachmentInfo depth_attachment {};
670 if (depth_image_view) {
671 depth_attachment.sType = vk::StructureType::eRenderingAttachmentInfo;
672 depth_attachment.pNext =
nullptr;
673 depth_attachment.imageView = depth_image_view;
674 depth_attachment.imageLayout = vk::ImageLayout::eDepthStencilAttachmentOptimal;
675 depth_attachment.resolveMode = vk::ResolveModeFlagBits::eNone;
676 depth_attachment.resolveImageView =
nullptr;
677 depth_attachment.resolveImageLayout = vk::ImageLayout::eUndefined;
678 depth_attachment.loadOp = vk::AttachmentLoadOp::eClear;
679 depth_attachment.storeOp = vk::AttachmentStoreOp::eDontCare;
680 depth_attachment.clearValue.depthStencil = vk::ClearDepthStencilValue { 1.0F, 0 };
683 vk::RenderingInfo rendering_info {};
684 rendering_info.sType = vk::StructureType::eRenderingInfo;
685 rendering_info.pNext =
nullptr;
686 rendering_info.flags = vk::RenderingFlagBits::eContentsSecondaryCommandBuffers;
687 rendering_info.renderArea.offset = vk::Offset2D { 0, 0 };
688 rendering_info.renderArea.extent = vk::Extent2D {
width, height };
689 rendering_info.layerCount = 1;
690 rendering_info.colorAttachmentCount = 1;
691 rendering_info.pColorAttachments = &color_attachment;
692 rendering_info.pDepthAttachment = depth_image_view ? &depth_attachment :
nullptr;
693 rendering_info.pStencilAttachment =
nullptr;
695 cmd.beginRendering(rendering_info);
698 "Began dynamic rendering for window '{}' ({}x{}, depth: {})",
699 window->get_create_info().title,
width, height,
700 depth_image_view ?
"yes" :
"no");
705 const std::shared_ptr<Core::Window>& window)
710 "Invalid command buffer ID: {}", cmd_id);
719 "No swapchain image tracked for window '{}'",
720 window->get_create_info().title);
724 vk::ImageMemoryBarrier post_barrier {};
725 post_barrier.oldLayout = vk::ImageLayout::eColorAttachmentOptimal;
726 post_barrier.newLayout = vk::ImageLayout::ePresentSrcKHR;
727 post_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
728 post_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
729 post_barrier.image = it->second.swapchain_image;
730 post_barrier.subresourceRange.aspectMask = vk::ImageAspectFlagBits::eColor;
731 post_barrier.subresourceRange.baseMipLevel = 0;
732 post_barrier.subresourceRange.levelCount = 1;
733 post_barrier.subresourceRange.baseArrayLayer = 0;
734 post_barrier.subresourceRange.layerCount = 1;
735 post_barrier.srcAccessMask = vk::AccessFlagBits::eColorAttachmentWrite;
736 post_barrier.dstAccessMask = vk::AccessFlagBits::eNone;
739 vk::PipelineStageFlagBits::eColorAttachmentOutput,
740 vk::PipelineStageFlagBits::eBottomOfPipe,
741 vk::DependencyFlags {},
746 it->second.swapchain_image =
nullptr;
749 "Ended dynamic rendering for window '{}'",
750 window->get_create_info().title);
762 "Invalid pipeline ID: {}", pipeline_id);
769 "Invalid command buffer ID: {}", cmd_id);
773 pipeline_it->second.pipeline->bind(
cmd);
778 const std::vector<std::shared_ptr<Buffers::VKBuffer>>& buffers,
779 uint32_t first_binding)
784 "Invalid command buffer ID: {}", cmd_id);
788 std::vector<vk::Buffer> vk_buffers;
789 std::vector<vk::DeviceSize> offsets(buffers.size(), 0);
791 vk_buffers.reserve(buffers.size());
792 for (
const auto& buf : buffers) {
793 vk_buffers.push_back(buf->get_buffer());
796 cmd.bindVertexBuffers(first_binding, vk_buffers, offsets);
801 const std::shared_ptr<Buffers::VKBuffer>& buffer,
802 vk::IndexType index_type)
807 "Invalid command buffer ID: {}", cmd_id);
811 cmd.bindIndexBuffer(buffer->get_index_buffer(), 0, index_type);
817 const std::vector<DescriptorSetID>& descriptor_sets,
823 "Invalid pipeline ID: {}", pipeline_id);
830 "Invalid command buffer ID: {}", cmd_id);
834 std::vector<vk::DescriptorSet> vk_sets;
835 vk_sets.reserve(descriptor_sets.size());
836 for (
auto ds_id : descriptor_sets) {
840 cmd.bindDescriptorSets(
841 vk::PipelineBindPoint::eGraphics,
842 pipeline_it->second.layout,
858 "Invalid pipeline ID: {}", pipeline_id);
865 "Invalid command buffer ID: {}", cmd_id);
870 pipeline_it->second.layout,
871 pipeline_it->second.push_constant_stages,
873 static_cast<uint32_t
>(
size),
879 uint32_t vertex_count,
880 uint32_t instance_count,
881 uint32_t first_vertex,
882 uint32_t first_instance)
887 "Invalid command buffer ID: {}", cmd_id);
891 cmd.draw(vertex_count, instance_count, first_vertex, first_instance);
896 uint32_t index_count,
897 uint32_t instance_count,
898 uint32_t first_index,
899 int32_t vertex_offset,
900 uint32_t first_instance)
907 cmd.drawIndexed(index_count, instance_count, first_index,
908 vertex_offset, first_instance);
913 uint32_t group_count_x,
914 uint32_t group_count_y,
915 uint32_t group_count_z)
920 "Invalid command buffer ID: {}", cmd_id);
924 cmd.drawMeshTasksEXT(group_count_x, group_count_y, group_count_z);
929 const std::shared_ptr<Buffers::VKBuffer>& buffer,
930 vk::DeviceSize offset,
938 cmd.drawMeshTasksIndirectEXT(buffer->get_buffer(), offset, draw_count, stride);
949 "Cannot register null window");
953 if (!window->is_graphics_registered()) {
955 "Window '{}' not registered with graphics backend yet.",
956 window->get_create_info().title);
961 association.
window = window;
965 "Registered window '{}' for dynamic rendering",
966 window->get_create_info().title);
982 "Unregistered window '{}' from rendering",
983 window->get_create_info().title);
994 std::vector<std::shared_ptr<Core::Window>> windows;
998 if (
auto window = association.window.lock()) {
999 windows.push_back(window);
1012 return *
static_cast<vk::ImageView*
>(view_ptr);
1021 uint32_t first_layout_index)
1026 "Invalid pipeline ID: {}", pipeline_id);
1030 const auto& layouts = pipeline_it->second.layouts;
1031 std::vector<DescriptorSetID> descriptor_set_ids;
1033 for (uint32_t i = first_layout_index; i < layouts.size(); ++i) {
1037 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
1040 descriptor_set_ids.push_back(ds_id);
1044 "Allocated {} descriptor sets for pipeline {} (starting at layout index {})",
1045 descriptor_set_ids.size(), pipeline_id, first_layout_index);
1047 return descriptor_set_ids;
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
#define MF_RT_ERROR(comp, ctx,...)
#define MF_TRACE(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
void bind_pipeline(CommandBufferID cmd_id, RenderPipelineID pipeline)
Bind graphics pipeline.
void push_constants(CommandBufferID cmd_id, RenderPipelineID pipeline, const void *data, size_t size, uint32_t offset=0)
Push constants.
void register_window_for_rendering(const std::shared_ptr< Core::Window > &window)
Register a window for dynamic rendering.
std::unordered_map< std::shared_ptr< Core::Window >, WindowRenderAssociation > m_window_associations
std::vector< DescriptorSetID > allocate_pipeline_descriptors(RenderPipelineID pipeline, uint32_t first_layout_index=0)
Allocate descriptor sets for pipeline.
void begin_rendering(CommandBufferID cmd_id, const std::shared_ptr< Core::Window > &window, vk::Image swapchain_image, const std::array< float, 4 > &clear_color=default_color, vk::ImageView depth_image_view=nullptr)
Begin dynamic rendering to a window.
vk::ImageView get_current_image_view(const std::shared_ptr< Core::Window > &window)
Get current image view for window.
void destroy_pipeline(RenderPipelineID pipeline_id)
Destroy a graphics pipeline.
void bind_vertex_buffers(CommandBufferID cmd_id, const std::vector< std::shared_ptr< Buffers::VKBuffer > > &buffers, uint32_t first_binding=0)
Bind vertex buffers.
vk::DescriptorSetLayout get_view_transform_layout(RenderPipelineID pipeline_id) const
Return the reserved ViewTransform UBO layout for a pipeline.
std::vector< std::shared_ptr< Core::Window > > get_registered_windows() const
Get all registered windows.
void end_rendering(CommandBufferID cmd_id, const std::shared_ptr< Core::Window > &window)
End dynamic rendering.
void draw_indexed(CommandBufferID cmd_id, uint32_t index_count, uint32_t instance_count=1, uint32_t first_index=0, int32_t vertex_offset=0, uint32_t first_instance=0)
Indexed draw command.
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
bool is_initialized() const
void bind_index_buffer(CommandBufferID cmd_id, const std::shared_ptr< Buffers::VKBuffer > &buffer, vk::IndexType index_type=vk::IndexType::eUint32)
Bind index buffer.
ShaderFoundry * m_shader_foundry
void draw_mesh_tasks(CommandBufferID cmd_id, uint32_t group_count_x, uint32_t group_count_y=1, uint32_t group_count_z=1)
Draw mesh tasks (mesh shading pipeline only)
bool is_window_registered(const std::shared_ptr< Core::Window > &window) const
Check if a window is registered for rendering.
void draw(CommandBufferID cmd_id, uint32_t vertex_count, uint32_t instance_count=1, uint32_t first_vertex=0, uint32_t first_instance=0)
Draw command.
void draw_mesh_tasks_indirect(CommandBufferID cmd_id, const std::shared_ptr< Buffers::VKBuffer > &buffer, vk::DeviceSize offset=0, uint32_t draw_count=1, uint32_t stride=sizeof(VkDrawMeshTasksIndirectCommandEXT))
Draw mesh tasks indirect.
void unregister_window(const std::shared_ptr< Core::Window > &window)
Unregister a window from rendering.
Registry::Service::DisplayService * m_display_service
std::atomic< uint64_t > m_next_pipeline_id
RenderPipelineID create_pipeline(const RenderPipelineConfig &config, const std::vector< vk::Format > &color_formats, vk::Format depth_format=vk::Format::eUndefined)
Create graphics pipeline for dynamic rendering (no render pass object)
void bind_descriptor_sets(CommandBufferID cmd_id, RenderPipelineID pipeline, const std::vector< DescriptorSetID > &descriptor_sets, uint32_t first_set=0)
Bind descriptor sets.
static bool s_initialized
vk::DescriptorSet get_descriptor_set(DescriptorSetID descriptor_set_id)
Get Vulkan descriptor set handle from DescriptorSetID.
vk::Device get_device() const
Get logical device handle.
std::shared_ptr< Core::VKShaderModule > get_vk_shader_module(ShaderID shader_id)
bool is_initialized() const
Check if compiler is initialized.
static ShaderFoundry & instance()
vk::CommandBuffer get_command_buffer(CommandBufferID cmd_id)
Get Vulkan command buffer handle from CommandBufferID.
DescriptorSetID allocate_descriptor_set(vk::DescriptorSetLayout layout)
Allocate descriptor set for a pipeline.
static std::pair< std::vector< Core::VertexBinding >, std::vector< Core::VertexAttribute > > translate_layout(const Kakshya::VertexLayout &layout, uint32_t binding_index=0)
Translate a semantic vertex layout to Vulkan binding/attribute descriptions.
Interface * get_service()
Query for a backend service.
static BackendRegistry & instance()
Get the global registry instance.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.
PolygonMode
Rasterization polygon mode.
constexpr RenderPipelineID INVALID_RENDER_PIPELINE
const std::array< float, 4 > default_color
CullMode
Face culling mode.
uint64_t RenderPipelineID
constexpr ShaderID INVALID_SHADER
BlendOp
Blending operation.
BlendFactor
Blending factor.
PrimitiveTopology
Vertex assembly primitive topology.
CompareOp
Depth/stencil comparison operation.
constexpr DescriptorSetID INVALID_DESCRIPTOR_SET
vk::BlendOp alpha_blend_op
vk::BlendFactor dst_alpha_blend_factor
vk::BlendFactor src_alpha_blend_factor
vk::BlendFactor dst_color_blend_factor
vk::BlendOp color_blend_op
vk::BlendFactor src_color_blend_factor
std::vector< ColorBlendAttachment > color_blend_attachments
bool use_vertex_shader_reflection
vk::CompareOp depth_compare_op
std::vector< vk::Format > color_attachment_formats
vk::PrimitiveTopology topology
std::shared_ptr< VKShaderModule > task_shader
std::shared_ptr< VKShaderModule > fragment_shader
std::shared_ptr< VKShaderModule > mesh_shader
std::vector< vk::DynamicState > dynamic_states
std::vector< vk::PushConstantRange > push_constant_ranges
vk::PolygonMode polygon_mode
std::shared_ptr< VKShaderModule > vertex_shader
std::vector< vk::DescriptorSetLayout > descriptor_set_layouts
std::vector< VertexBinding > vertex_bindings
bool primitive_restart_enable
vk::CullModeFlags cull_mode
std::vector< VertexAttribute > vertex_attributes
std::shared_ptr< VKShaderModule > geometry_shader
vk::Format depth_attachment_format
std::shared_ptr< VKShaderModule > tess_evaluation_shader
std::shared_ptr< VKShaderModule > tess_control_shader
Configuration for creating a graphics pipeline.
CompareOp depth_compare_op
std::vector< vk::DescriptorSetLayout > layouts
vk::DescriptorSetLayout view_transform_layout
vk::ShaderStageFlags push_constant_stages
std::shared_ptr< Core::VKGraphicsPipeline > pipeline
vk::PipelineLayout layout
std::vector< ShaderID > shader_ids
std::weak_ptr< Core::Window > window
std::vector< std::vector< DescriptorBindingInfo > > descriptor_sets
std::vector< Core::VertexAttribute > vertex_attributes
ShaderID tess_eval_shader
Optional.
std::vector< Core::VertexBinding > vertex_bindings
std::optional< Kakshya::VertexLayout > semantic_vertex_layout
ShaderID tess_control_shader
Optional.
bool use_vertex_shader_reflection
std::vector< BlendAttachmentConfig > blend_attachments
DepthStencilConfig depth_stencil
ShaderID mesh_shader
Optional.
size_t push_constant_size
PrimitiveTopology topology
ShaderID geometry_shader
Optional.
ShaderID task_shader
Optional.
RasterizationConfig rasterization
Complete render pipeline configuration.
std::function< void *(const std::shared_ptr< void > &)> get_current_image_view
Get current swapchain image view for rendering.
std::function< void(const std::shared_ptr< void > &, uint32_t &, uint32_t &)> get_swapchain_extent
Get swapchain extent for a window.
Backend display and presentation service interface.