Renderer: Add RenderPipeline::GetPipelineInfo

This commit is contained in:
Jérôme Leclercq 2020-10-30 23:07:21 +01:00
parent b62130dab9
commit 40f3072ff9
4 changed files with 10 additions and 2 deletions

View File

@ -24,7 +24,7 @@ namespace Nz
void Apply(const GL::Context& context) const; void Apply(const GL::Context& context) const;
inline const RenderPipelineInfo& GetPipelineInfo() const; inline const RenderPipelineInfo& GetPipelineInfo() const override;
private: private:
RenderPipelineInfo m_pipelineInfo; RenderPipelineInfo m_pipelineInfo;

View File

@ -22,7 +22,7 @@ namespace Nz
}; };
std::shared_ptr<RenderPipelineLayout> pipelineLayout; std::shared_ptr<RenderPipelineLayout> pipelineLayout;
std::vector<std::shared_ptr<ShaderStageImpl>> shaderStages; std::vector<std::shared_ptr<ShaderStage>> shaderStages;
std::vector<VertexBufferData> vertexBuffers; std::vector<VertexBufferData> vertexBuffers;
}; };
@ -31,6 +31,8 @@ namespace Nz
public: public:
RenderPipeline() = default; RenderPipeline() = default;
virtual ~RenderPipeline(); virtual ~RenderPipeline();
virtual const RenderPipelineInfo& GetPipelineInfo() const = 0;
}; };
} }

View File

@ -28,6 +28,8 @@ namespace Nz
VkPipeline Get(const Vk::RenderPass& renderPass) const; VkPipeline Get(const Vk::RenderPass& renderPass) const;
inline const RenderPipelineInfo& GetPipelineInfo() const override;
static std::vector<VkPipelineColorBlendAttachmentState> BuildColorBlendAttachmentStateList(const RenderPipelineInfo& pipelineInfo); static std::vector<VkPipelineColorBlendAttachmentState> BuildColorBlendAttachmentStateList(const RenderPipelineInfo& pipelineInfo);
static VkPipelineColorBlendStateCreateInfo BuildColorBlendInfo(const RenderPipelineInfo& pipelineInfo, const std::vector<VkPipelineColorBlendAttachmentState>& attachmentState); static VkPipelineColorBlendStateCreateInfo BuildColorBlendInfo(const RenderPipelineInfo& pipelineInfo, const std::vector<VkPipelineColorBlendAttachmentState>& attachmentState);
static VkPipelineDepthStencilStateCreateInfo BuildDepthStencilInfo(const RenderPipelineInfo& pipelineInfo); static VkPipelineDepthStencilStateCreateInfo BuildDepthStencilInfo(const RenderPipelineInfo& pipelineInfo);

View File

@ -7,6 +7,10 @@
namespace Nz namespace Nz
{ {
inline const RenderPipelineInfo& VulkanRenderPipeline::GetPipelineInfo() const
{
return m_pipelineInfo;
}
} }
#include <Nazara/VulkanRenderer/DebugOff.hpp> #include <Nazara/VulkanRenderer/DebugOff.hpp>