2
3
4
5
9#include "Resources/Mesh/Mesh.h"
10#include "Resources/ResourcePool/ResourcePool.h"
11#include "Resources/Shader/Shader.h"
12#include "Render/Renderer/RendererPass/RendererPass.h"
18 const std::string& pipelineName ,
19 const ShaderMap& shaders ,
27
28
29 m_PipelineLayout = config.pipelineLayout;
32
33
34 std::vector<std::shared_ptr<VulkanShaderModule>> shaderModules;
35 for (
auto& pair : shaders)
37 if (pair.first ==
"rchit")
continue;
39 for (size_t i = 0; i < pair.second.size(); i++)
42 ss << pair.first <<
"." << pair.second[i];
44 shaderModules.push_back(ResourcePool<Shader>::Load<Shader>(ss.str(), pair.second[i], pair.first)->GetShaderModule());
49
50
51 std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
52 for (size_t i = 0; i < shaderModules.size(); i++)
54 shaderStages.push_back(shaderModules[i]->GetShaderStageCreateInfo());
57 auto& bindingDescriptions = config.bindingDescriptions;
58 auto& attributeDescriptions = config.attributeDescriptions;
61
62
63 VkPipelineVertexInputStateCreateInfo vertexInputInfo{};
64 vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
65 vertexInputInfo.vertexAttributeDescriptionCount =
static_cast<uint32_t>(attributeDescriptions.size());
66 vertexInputInfo.vertexBindingDescriptionCount =
static_cast<uint32_t>(bindingDescriptions.size());
67 vertexInputInfo.pVertexAttributeDescriptions = vertexInputInfo.vertexAttributeDescriptionCount > 0 ? attributeDescriptions.data() :
nullptr;
68 vertexInputInfo.pVertexBindingDescriptions = vertexInputInfo.vertexBindingDescriptionCount > 0 ? bindingDescriptions.data() :
nullptr;
71
72
73 VkGraphicsPipelineCreateInfo pipelineInfo{};
74 pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
75 pipelineInfo.flags = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV;
76 pipelineInfo.stageCount =
static_cast<uint32_t>(shaderStages.size());
77 pipelineInfo.pStages = shaderStages.data();
78 pipelineInfo.pVertexInputState = &vertexInputInfo;
79 pipelineInfo.pInputAssemblyState = &config.inputAssemblyInfo;
80 pipelineInfo.pViewportState = &config.viewportInfo;
81 pipelineInfo.pRasterizationState = &config.rasterizationInfo;
82 pipelineInfo.pMultisampleState = &config.multisampleInfo;
83 pipelineInfo.pColorBlendState = &config.colorBlendInfo;
84 pipelineInfo.pDepthStencilState = &config.depthStencilInfo;
85 pipelineInfo.pDynamicState = &config.dynamicStateInfo;
87 pipelineInfo.layout = m_PipelineLayout;
88 pipelineInfo.renderPass = config.renderPass->Get();
89 pipelineInfo.subpass = config.subpass;
91 pipelineInfo.basePipelineIndex = -1;
92 pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
95
96
97 VK_CHECK(vkCreateGraphicsPipelines(m_VulkanState.m_Device, VK_NULL_HANDLE, 1, &pipelineInfo,
nullptr, &m_Pipeline))
98 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
106
107
108 vkDestroyPipelineLayout(m_VulkanState.m_Device, m_PipelineLayout,
nullptr);
111
112
113 vkDestroyPipeline(m_VulkanState.m_Device, m_Pipeline,
nullptr);
121
122
123 configInfo.inputAssemblyInfo = VkPipelineInputAssemblyStateCreateInfo{};
124 configInfo.inputAssemblyInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
125 configInfo.inputAssemblyInfo.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
126 configInfo.inputAssemblyInfo.primitiveRestartEnable = VK_FALSE;
129
130
131 configInfo.viewportInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
132 configInfo.viewportInfo.viewportCount = 1;
133 configInfo.viewportInfo.pViewports = &configInfo.viewport;
134 configInfo.viewportInfo.scissorCount = 1;
135 configInfo.viewportInfo.pScissors = &configInfo.scissor;
138
139
140 configInfo.rasterizationInfo = VkPipelineRasterizationStateCreateInfo{};
141 configInfo.rasterizationInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
142 configInfo.rasterizationInfo.depthClampEnable = VK_FALSE;
143 configInfo.rasterizationInfo.rasterizerDiscardEnable = VK_FALSE;
144 configInfo.rasterizationInfo.polygonMode = VK_POLYGON_MODE_FILL;
145 configInfo.rasterizationInfo.lineWidth = 1.0f;
146 configInfo.rasterizationInfo.cullMode = VK_CULL_MODE_BACK_BIT;
147 configInfo.rasterizationInfo.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
148 configInfo.rasterizationInfo.depthBiasEnable = VK_FALSE;
149 configInfo.rasterizationInfo.depthBiasConstantFactor = 0.0f;
150 configInfo.rasterizationInfo.depthBiasClamp = 0.0f;
151 configInfo.rasterizationInfo.depthBiasSlopeFactor = 0.0f;
154
155
156 configInfo.multisampleInfo = VkPipelineMultisampleStateCreateInfo{};
157 configInfo.multisampleInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
158 configInfo.multisampleInfo.sampleShadingEnable = VK_FALSE;
159 configInfo.multisampleInfo.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
160 configInfo.multisampleInfo.minSampleShading = 1.0f;
161 configInfo.multisampleInfo.pSampleMask =
nullptr;
162 configInfo.multisampleInfo.alphaToCoverageEnable = VK_FALSE;
163 configInfo.multisampleInfo.alphaToOneEnable = VK_FALSE;
166
167
168 configInfo.colorBlendInfo = VkPipelineColorBlendStateCreateInfo{};
169 configInfo.colorBlendInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
170 configInfo.colorBlendInfo.logicOpEnable = VK_FALSE;
171 configInfo.colorBlendInfo.logicOp = VK_LOGIC_OP_COPY;
173 configInfo.colorBlendInfo.attachmentCount = 0;
174 configInfo.colorBlendInfo.pAttachments =
nullptr;
175 configInfo.colorBlendInfo.blendConstants[0] = 0.0f;
176 configInfo.colorBlendInfo.blendConstants[1] = 0.0f;
177 configInfo.colorBlendInfo.blendConstants[2] = 0.0f;
178 configInfo.colorBlendInfo.blendConstants[3] = 0.0f;
181
182
183 configInfo.depthStencilInfo = VkPipelineDepthStencilStateCreateInfo{};
184 configInfo.depthStencilInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
185 configInfo.depthStencilInfo.depthTestEnable = VK_TRUE;
186 configInfo.depthStencilInfo.depthWriteEnable = VK_TRUE;
187 configInfo.depthStencilInfo.depthCompareOp = VK_COMPARE_OP_GREATER_OR_EQUAL;
188 configInfo.depthStencilInfo.depthBoundsTestEnable = VK_FALSE;
189 configInfo.depthStencilInfo.minDepthBounds = 0.0f;
190 configInfo.depthStencilInfo.maxDepthBounds = 1.0f;
191 configInfo.depthStencilInfo.stencilTestEnable = VK_FALSE;
192 configInfo.depthStencilInfo.front = {};
193 configInfo.depthStencilInfo.back = {};
196
197
198 configInfo.dynamicStateEnables = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
199 configInfo.dynamicStateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
200 configInfo.dynamicStateInfo.pDynamicStates = configInfo.dynamicStateEnables.data();
201 configInfo.dynamicStateInfo.dynamicStateCount =
static_cast<uint32_t>(configInfo.dynamicStateEnables.size());
202 configInfo.dynamicStateInfo.flags = 0;
205
206
207 configInfo.bindingDescriptions = InputAssembly::GetBindingDescriptions();
210
211
212 configInfo.attributeDescriptions = InputAssembly::GetAttributeDescriptions();
217 const std::string& pipelineName ,
218 const ShaderMap& shaders ,
226
227
228 m_PipelineLayout = config.pipelineLayout;
231
232
233 std::vector<std::shared_ptr<VulkanShaderModule>> shaderModules;
234 for (
auto& pair : shaders)
236 for(size_t i = 0; i < pair.second.size(); i++)
238 std::stringstream ss;
239 ss << pair.first <<
"." << pair.second[i];
241 shaderModules.push_back(ResourcePool<Shader>::Load<Shader>(ss.str(), pair.second[i], pair.first)->GetShaderModule());
246
247
248 std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
249 for (size_t i = 0; i < shaderModules.size(); i++)
251 shaderStages.push_back(shaderModules[i]->GetShaderStageCreateInfo());
255
256
257 VkRayTracingShaderGroupCreateInfoKHR group{};
258 group.sType = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR;
259 group.anyHitShader = VK_SHADER_UNUSED_KHR;
260 group.closestHitShader = VK_SHADER_UNUSED_KHR;
261 group.generalShader = VK_SHADER_UNUSED_KHR;
262 group.intersectionShader = VK_SHADER_UNUSED_KHR;
264 std::vector<VkRayTracingShaderGroupCreateInfoKHR> m_RTShaderGroups;
266 for (
auto& pair : shaders)
269
270
271 if(pair.first ==
"rgen")
273 for(size_t i = 0; i < pair.second.size(); i++)
275 group.type = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR;
276 group.generalShader =
static_cast<uint32_t>(m_RTShaderGroups.size());
278 m_RTShaderGroups.push_back(group);
283
284
285 else if(pair.first ==
"rmiss")
287 for(size_t i = 0; i < pair.second.size(); i++)
289 group.type = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR;
290 group.generalShader =
static_cast<uint32_t>(m_RTShaderGroups.size());
292 m_RTShaderGroups.push_back(group);
297
298
299 else if(pair.first ==
"rchit")
301 for(size_t i = 0; i < pair.second.size(); i++)
303 group.type = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR;
304 group.generalShader = VK_SHADER_UNUSED_KHR;
305 group.closestHitShader =
static_cast<uint32_t>(m_RTShaderGroups.size());
307 m_RTShaderGroups.push_back(group);
312 SPICES_CORE_ERROR(
"RayTracing Pipeline: Not Supported Sahder Stage from material.");
317
318
319 VkRayTracingPipelineCreateInfoKHR rayPipelineInfo{};
320 rayPipelineInfo.sType = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR;
321 rayPipelineInfo.stageCount =
static_cast<uint32_t>(shaderStages.size());
322 rayPipelineInfo.pStages = shaderStages.data();
323 rayPipelineInfo.groupCount =
static_cast<uint32_t>(m_RTShaderGroups.size());
324 rayPipelineInfo.pGroups = m_RTShaderGroups.data();
325 rayPipelineInfo.maxPipelineRayRecursionDepth = 2;
326 rayPipelineInfo.layout = m_PipelineLayout;
329
330
331 VK_CHECK(m_VulkanState.m_VkFunc.vkCreateRayTracingPipelinesKHR(m_VulkanState.m_Device, {}, {}, 1, &rayPipelineInfo,
nullptr, &m_Pipeline))
332 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
337 const std::string& pipelineName ,
338 const ShaderMap& shaders ,
346
347
348 m_PipelineLayout = config.pipelineLayout;
351
352
353 std::vector<std::shared_ptr<VulkanShaderModule>> shaderModules;
354 for (
auto& pair : shaders)
356 if (pair.first ==
"comp")
358 std::stringstream ss;
359 ss << pair.first <<
"." << pair.second[0];
361 shaderModules.push_back(ResourcePool<Shader>::Load<Shader>(ss.str(), pair.second[0], pair.first)->GetShaderModule());
368
369
370 std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
371 for (size_t i = 0; i < shaderModules.size(); i++)
373 shaderStages.push_back(shaderModules[i]->GetShaderStageCreateInfo());
377
378
379
380 VkComputePipelineCreateInfo pipelineInfo {};
381 pipelineInfo.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
383 pipelineInfo.layout = m_PipelineLayout;
384 pipelineInfo.stage = shaderStages[0];
387
388
389 VK_CHECK(vkCreateComputePipelines(m_VulkanState.m_Device, VK_NULL_HANDLE, 1, &pipelineInfo,
nullptr, &m_Pipeline))
390 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
395 const std::string& pipelineName ,
396 const ShaderMap& shaders,
404
405
406 m_PipelineLayout = config.pipelineLayout;
409
410
411 std::vector<std::shared_ptr<VulkanShaderModule>> shaderModules;
415 for (
auto& pair : shaders)
417 if (pair.first ==
"rchit")
continue;
419 for (size_t i = 0; i < pair.second.size(); i++)
421 std::stringstream ss;
422 ss << pair.first <<
"." << pair.second[i];
424 shaderModules.push_back(ResourcePool<Shader>::Load<Shader>(ss.str(), pair.second[i], pair.first)->GetShaderModule());
430
431
432 std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
433 for (size_t i = 0; i < shaderModules.size(); i++)
435 shaderStages.push_back(shaderModules[i]->GetShaderStageCreateInfo());
439
440
441 VkGraphicsPipelineCreateInfo pipelineInfo{};
442 pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
443 pipelineInfo.flags = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV;
444 pipelineInfo.stageCount =
static_cast<uint32_t>(shaderStages.size());
445 pipelineInfo.pStages = shaderStages.data();
446 pipelineInfo.pVertexInputState =
nullptr;
447 pipelineInfo.pInputAssemblyState =
nullptr;
448 pipelineInfo.pViewportState = &config.viewportInfo;
449 pipelineInfo.pRasterizationState = &config.rasterizationInfo;
450 pipelineInfo.pMultisampleState = &config.multisampleInfo;
451 pipelineInfo.pColorBlendState = &config.colorBlendInfo;
452 pipelineInfo.pDepthStencilState = &config.depthStencilInfo;
453 pipelineInfo.pDynamicState = &config.dynamicStateInfo;
455 pipelineInfo.layout = m_PipelineLayout;
456 pipelineInfo.renderPass = config.renderPass->Get();
457 pipelineInfo.subpass = config.subpass;
459 pipelineInfo.basePipelineIndex = -1;
460 pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
463
464
465 VK_CHECK(vkCreateGraphicsPipelines(m_VulkanState.m_Device, VK_NULL_HANDLE, 1, &pipelineInfo,
nullptr, &m_Pipeline))
466 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
471 const std::string& pipelineName ,
472 const std::string& materialName ,
473 const std::vector<VkPipeline>& pipelineRef ,
481
482
483 m_PipelineLayout = config.pipelineLayout;
486
487
488
489
490 const auto material = ResourcePool<Material>::Load<Material>(materialName, materialName);
492 std::stringstream ss;
493 ss <<
"vert" <<
"." << material->GetShaderPath(
"vert")[0];
495 VkPipelineShaderStageCreateInfo stage = ResourcePool<Shader>::Load<Shader>(ss.str(), material->GetShaderPath(
"vert")[0], ShaderStage::vert)->GetShaderModule()->GetShaderStageCreateInfo();
497 VkGraphicsShaderGroupCreateInfoNV group{};
498 group.sType = VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV;
499 group.stageCount = 1;
500 group.pStages = &stage;
503
504
505 VkGraphicsPipelineShaderGroupsCreateInfoNV groupsCreateInfo{};
506 groupsCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV;
507 groupsCreateInfo.pipelineCount =
static_cast<uint32_t>(pipelineRef.size());
508 groupsCreateInfo.pPipelines = pipelineRef.data();
509 groupsCreateInfo.groupCount = 1;
510 groupsCreateInfo.pGroups = &group;
512 auto& bindingDescriptions = config.bindingDescriptions;
513 auto& attributeDescriptions = config.attributeDescriptions;
516
517
518 VkPipelineVertexInputStateCreateInfo vertexInputInfo{};
519 vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
520 vertexInputInfo.vertexAttributeDescriptionCount =
static_cast<uint32_t>(attributeDescriptions.size());
521 vertexInputInfo.vertexBindingDescriptionCount =
static_cast<uint32_t>(bindingDescriptions.size());
522 vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions.data();
523 vertexInputInfo.pVertexBindingDescriptions = bindingDescriptions.data();
526
527
528
529 VkGraphicsPipelineCreateInfo pipelineInfo{};
530 pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
531 pipelineInfo.flags = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV;
532 pipelineInfo.stageCount = 1;
533 pipelineInfo.pStages = &stage;
534 pipelineInfo.pVertexInputState = &vertexInputInfo;
535 pipelineInfo.pInputAssemblyState = &config.inputAssemblyInfo;
536 pipelineInfo.pViewportState = &config.viewportInfo;
537 pipelineInfo.pRasterizationState = &config.rasterizationInfo;
538 pipelineInfo.pMultisampleState = &config.multisampleInfo;
539 pipelineInfo.pColorBlendState = &config.colorBlendInfo;
540 pipelineInfo.pDepthStencilState = &config.depthStencilInfo;
541 pipelineInfo.pDynamicState = &config.dynamicStateInfo;
543 pipelineInfo.layout = m_PipelineLayout;
544 pipelineInfo.renderPass = config.renderPass->Get();
545 pipelineInfo.subpass = config.subpass;
547 pipelineInfo.basePipelineIndex = -1;
548 pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
549 pipelineInfo.pNext = &groupsCreateInfo;
552
553
554 VK_CHECK(vkCreateGraphicsPipelines(m_VulkanState.m_Device, VK_NULL_HANDLE, 1, &pipelineInfo,
nullptr, &m_Pipeline))
555 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
560 const std::string& pipelineName ,
561 const std::string& materialName ,
562 const std::vector<VkPipeline>& pipelineRef ,
570
571
572 m_PipelineLayout = config.pipelineLayout;
575
576
577
578
579 const auto material = ResourcePool<Material>::Load<Material>(materialName, materialName);
581 std::stringstream ss;
582 ss <<
"mesh" <<
"." << material->GetShaderPath(
"mesh")[0];
584 VkPipelineShaderStageCreateInfo stage = ResourcePool<Shader>::Load<Shader>(ss.str(), material->GetShaderPath(
"mesh")[0], ShaderStage::vert)->GetShaderModule()->GetShaderStageCreateInfo();
587 VkGraphicsShaderGroupCreateInfoNV group{};
588 group.sType = VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV;
589 group.stageCount = 1;
590 group.pStages = &stage;
593
594
595 VkGraphicsPipelineShaderGroupsCreateInfoNV groupsCreateInfo{};
596 groupsCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV;
597 groupsCreateInfo.pipelineCount =
static_cast<uint32_t>(pipelineRef.size());
598 groupsCreateInfo.pPipelines = pipelineRef.data();
599 groupsCreateInfo.groupCount = 1;
600 groupsCreateInfo.pGroups = &group;
603
604
605
606 VkGraphicsPipelineCreateInfo pipelineInfo{};
607 pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
608 pipelineInfo.flags = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV;
609 pipelineInfo.stageCount = 1;
610 pipelineInfo.pStages = &stage;
611 pipelineInfo.pVertexInputState =
nullptr;
612 pipelineInfo.pInputAssemblyState =
nullptr;
613 pipelineInfo.pViewportState = &config.viewportInfo;
614 pipelineInfo.pRasterizationState = &config.rasterizationInfo;
615 pipelineInfo.pMultisampleState = &config.multisampleInfo;
616 pipelineInfo.pColorBlendState = &config.colorBlendInfo;
617 pipelineInfo.pDepthStencilState = &config.depthStencilInfo;
618 pipelineInfo.pDynamicState = &config.dynamicStateInfo;
620 pipelineInfo.layout = m_PipelineLayout;
621 pipelineInfo.renderPass = config.renderPass->Get();
622 pipelineInfo.subpass = config.subpass;
624 pipelineInfo.basePipelineIndex = -1;
625 pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
626 pipelineInfo.pNext = &groupsCreateInfo;
629
630
631 VK_CHECK(vkCreateGraphicsPipelines(m_VulkanState.m_Device, VK_NULL_HANDLE, 1, &pipelineInfo,
nullptr, &m_Pipeline))
632 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_PIPELINE,
reinterpret_cast<uint64_t>(m_Pipeline), m_VulkanState.m_Device, pipelineName)
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
VulkanComputePipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Compute Pipeline.
VulkanIndirectMeshPipelineNV(VulkanState &vulkanState, const std::string &pipelineName, const std::string &materialName, const std::vector< VkPipeline > &pipelineRef, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Indirect Mesh Pipeline.
VulkanIndirectPipelineNV(VulkanState &vulkanState, const std::string &pipelineName, const std::string &materialName, const std::vector< VkPipeline > &pipelineRef, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Indirect Pipeline.
VulkanMeshPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Mesh Pipeline.
VulkanObject(VulkanState &vulkanState)
Constructor Function. Init member variables.
VulkanObject Class. This class defines the basic behaves of VulkanObject. When we create an new Vulka...
VulkanPipeline(VulkanState &vulkanState)
Constructor Function.
virtual ~VulkanPipeline() override
Destructor Function.
static void DefaultPipelineConfigInfo(PipelineConfigInfo &configInfo)
Create a PipelineConfigInfo with default parameter.
VulkanPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of VkPipelineLayout and VkPipeline.
VulkanRayTracingPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of RayTracing Pipeline.
This struct included all infos usd to create a VkPipeline.
This struct contains all Vulkan object in used global.