Skip to content
Snippets Groups Projects
Commit cc0ee8d9 authored by Mark Oliver Mints's avatar Mark Oliver Mints
Browse files

[#71] move documentation to header

parent bd79dfe9
No related branches found
No related tags found
1 merge request!83Resolve "Refactor Pipeline Config and Manager"
Pipeline #26687 passed
...@@ -539,13 +539,6 @@ namespace vkcv ...@@ -539,13 +539,6 @@ namespace vkcv
return m_Device.createShaderModule(&moduleInfo, nullptr, &module); return m_Device.createShaderModule(&moduleInfo, nullptr, &module);
} }
/**
* Fills Vertex Attribute and Binding Description with the corresponding objects form the Vertex Layout.
* @param vertexAttributeDescriptions
* @param vertexBindingDescriptions
* @param existsVertexShader
* @param config
*/
void PipelineManager::fillVertexInputDescription( void PipelineManager::fillVertexInputDescription(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions, std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions, std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions,
...@@ -574,12 +567,6 @@ namespace vkcv ...@@ -574,12 +567,6 @@ namespace vkcv
} }
} }
/**
* Create a Pipeline Vertex Input State Create Info Struct and fills it with Attribute and Binding data.
* @param vertexAttributeDescriptions
* @param vertexBindingDescriptions
* @return Pipeline Vertex Input State Create Info Struct
*/
vk::PipelineVertexInputStateCreateInfo PipelineManager::createPipelineVertexInputStateCreateInfo( vk::PipelineVertexInputStateCreateInfo PipelineManager::createPipelineVertexInputStateCreateInfo(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions, std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions) { std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions) {
......
...@@ -10,31 +10,6 @@ namespace vkcv ...@@ -10,31 +10,6 @@ namespace vkcv
{ {
class PipelineManager class PipelineManager
{ {
private:
struct Pipeline {
vk::Pipeline m_handle;
vk::PipelineLayout m_layout;
PipelineConfig m_config;
};
vk::Device m_Device;
std::vector<Pipeline> m_Pipelines;
void destroyPipelineById(uint64_t id);
vk::Result createShaderModule(vk::ShaderModule &module, const ShaderProgram &shaderProgram, ShaderStage stage);
void fillVertexInputDescription(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions,
const bool existsVertexShader,
const PipelineConfig &config);
vk::PipelineVertexInputStateCreateInfo createPipelineVertexInputStateCreateInfo(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions
);
public: public:
PipelineManager() = delete; // no default ctor PipelineManager() = delete; // no default ctor
explicit PipelineManager(vk::Device device) noexcept; // ctor explicit PipelineManager(vk::Device device) noexcept; // ctor
...@@ -60,5 +35,43 @@ namespace vkcv ...@@ -60,5 +35,43 @@ namespace vkcv
[[nodiscard]] [[nodiscard]]
const PipelineConfig &getPipelineConfig(const PipelineHandle &handle) const; const PipelineConfig &getPipelineConfig(const PipelineHandle &handle) const;
private:
struct Pipeline {
vk::Pipeline m_handle;
vk::PipelineLayout m_layout;
PipelineConfig m_config;
};
vk::Device m_Device;
std::vector<Pipeline> m_Pipelines;
void destroyPipelineById(uint64_t id);
vk::Result createShaderModule(vk::ShaderModule &module, const ShaderProgram &shaderProgram, ShaderStage stage);
/**
* Fills Vertex Attribute and Binding Description with the corresponding objects form the Vertex Layout.
* @param vertexAttributeDescriptions
* @param vertexBindingDescriptions
* @param existsVertexShader
* @param config
*/
void fillVertexInputDescription(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions,
const bool existsVertexShader,
const PipelineConfig &config);
/**
* Create a Pipeline Vertex Input State Create Info Struct and fills it with Attribute and Binding data.
* @param vertexAttributeDescriptions
* @param vertexBindingDescriptions
* @return Pipeline Vertex Input State Create Info Struct
*/
vk::PipelineVertexInputStateCreateInfo createPipelineVertexInputStateCreateInfo(
std::vector<vk::VertexInputAttributeDescription> &vertexAttributeDescriptions,
std::vector<vk::VertexInputBindingDescription> &vertexBindingDescriptions
);
}; };
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment