SpiecsEngine
 
Loading...
Searching...
No Matches

◆ CreatePipelineLayout()

VkPipelineLayout Spices::Renderer::CreatePipelineLayout ( const std::vector< VkDescriptorSetLayout > & rowSetLayouts,
const std::shared_ptr< RendererSubPass > & subPass ) const
protectedinherited

Create Pipeline Layout with material's descriptorset and renderer's descriptor set.

Parameters
[in]rowSetLayoutsAll descriptor set collected.
[in]subPassmaterial used sub pass.

Instance a VkPipelineLayoutCreateInfo.

Create a VkPipelineLayout.

Instance a VkPipelineLayoutCreateInfo.

Create a VkPipelineLayout.

Definition at line 271 of file Renderer.cpp.

275 {
277
281 VkPipelineLayoutCreateInfo pipelineLayoutInfo{};
282 pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
283 pipelineLayoutInfo.setLayoutCount = static_cast<uint32_t>(rowSetLayouts.size());
284 pipelineLayoutInfo.pSetLayouts = rowSetLayouts.data();
285 pipelineLayoutInfo.pushConstantRangeCount = 0;
286 pipelineLayoutInfo.pPushConstantRanges = nullptr;
287
288 if (subPass->IsUsePushConstant())
289 {
290 pipelineLayoutInfo.pushConstantRangeCount = 1;
291 pipelineLayoutInfo.pPushConstantRanges = &subPass->GetPushConstant();
292 }
293
297 VkPipelineLayout pipelineLayout;
298 VK_CHECK(vkCreatePipelineLayout(m_VulkanState.m_Device, &pipelineLayoutInfo, nullptr, &pipelineLayout))
299 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE_LAYOUT, reinterpret_cast<uint64_t>(pipelineLayout), m_VulkanState.m_Device, "PipelineLayout")
300
301 return pipelineLayout;
302 }
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
Definition VulkanUtils.h:68
VulkanState & m_VulkanState
This variable is passed while renderer instanced.
Definition Renderer.h:1992