backup - missing some
[demo] / src / vulkan / vkutil-pipeline.h
index 4dac9af..9cd99fa 100644 (file)
@@ -3,6 +3,12 @@
 
 #include <vulkan/vulkan.h>
 
+enum VkuVertexBindings {
+       VKU_BIND_VERTEX,
+       VKU_BIND_NORMAL,
+       VKU_BIND_TEX_COORD
+};
+
 enum VkuDynState {
        VKU_DS_VIEWPORT = 1 << 0,
        VKU_DS_SCISSOR  = 1 << 1,
@@ -12,7 +18,6 @@ enum VkuDynState {
 class VkuPipelineGenerator {
 private:
        VkPipelineShaderStageCreateInfo sdri[2];
-       VkPipelineVertexInputStateCreateInfo verti;
        VkPipelineInputAssemblyStateCreateInfo asmi;
        VkPipelineViewportStateCreateInfo viewpi;
        VkPipelineRasterizationStateCreateInfo rasti;
@@ -20,7 +25,13 @@ private:
        VkPipelineDepthStencilStateCreateInfo depthi;
        VkPipelineColorBlendStateCreateInfo cblendi;
 
-       VkPipelineLayout layout;
+       /* attributes */
+       std::vector<VkVertexInputBindingDescription> bind_descriptions;
+       std::vector<VkVertexInputAttributeDescription> attr_descriptions;
+
+       /* resources */
+       std::vector<VkDescriptorSetLayout> res_layouts;
+//     std::vector<VkPushConstantRange> push_const_ranges;
 
 public:
        VkuPipelineGenerator();
@@ -29,11 +40,9 @@ public:
        VkPipeline generate(VkuDynState dyn_flags) const;
 
        void set_shader_modules(VkShaderModule vs, VkShaderModule fs);
+       void set_attribute(uint32_t binding, uint32_t stride, uint32_t location,
+                       VkFormat format);
 
-       // TODO
-       void set_vertex_attributes();
-       void set_blend_state();
-       void set_layout();
 };
 
 #endif // VKUTIL_PIPELINE_H_