X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=src%2Fvulkan%2Fvkutil.h;fp=src%2Fvulkan%2Fvkutil.h;h=775fd2735d1775ef4bc68f90b6d2d41ed46e7631;hp=1c9ceac4c3312f76d2ec62fcf5b306d870bc179b;hb=dbce2a319517c09fcf1a9be60ae46a0ff20c423e;hpb=86c912d603be75ac8b2fdb2229f1696e9c0c01d9 diff --git a/src/vulkan/vkutil.h b/src/vulkan/vkutil.h index 1c9ceac..775fd27 100644 --- a/src/vulkan/vkutil.h +++ b/src/vulkan/vkutil.h @@ -13,6 +13,7 @@ extern VkSurfaceKHR vk_surface; extern VkInstance vk_instance; extern int vk_qfamily; extern VkDescriptorPool vk_dpool; +extern VkRenderPass vk_renderpass; struct vku_buffer { VkBuffer buf; @@ -28,6 +29,37 @@ struct vku_descriptor { int size; }; +struct vku_pipeline { +}; + +struct vku_pipeline_info { + /* shader stages */ + VkShaderModule vs; + VkShaderModule fs; + + /* states info */ + + VkPipelineShaderStageCreateInfo inf_shader_stage; + + VkPipelineVertexInputStateCreateInfo inf_vertex_input; + + VkPipelineInputAssemblyStateCreateInfo inf_input_asm; + + VkPipelineTessellationStateCreateInfo inf_tessel; + + VkPipelineViewportStateCreateInfo inf_viewport; + VkPipelineRasterizationStateCreateInfo inf_raster; + VkPipelineMultisampleStateCreateInfo inf_multisample; + VkPipelineDepthStencilStateCreateInfo inf_depth_stencil; + VkPipelineColorBlendStateCreateInfo inf_colorblend; + + VkPipelineDynamicStateCreateInfo inf_dynamic_state; + + VkPipelineLayout layout; + VkRenderPass renderpass; + uint32_t subpass; +}; + /* extensions */ bool vku_have_extension(const char *name); bool vku_have_device_extension(const char *name); @@ -68,7 +100,8 @@ vku_descriptor *vku_create_descriptor(VkDescriptorType type, VkFlags stage, int binding_point, int size); void vku_destroy_descriptor(vku_descriptor *descriptor); -bool vku_create_descriptor_pool(vku_descriptor **descriptors, int num_desc, VkDescriptorSet set); +bool vku_create_descriptor_pool(vku_descriptor **descriptors, int num_desc, + VkDescriptorSet set); void vku_destroy_descriptor_pool(); #endif // VKUTIL_H_