void RayTracingPipeline::addShader (VkShaderStageFlagBits shaderStage, Move<VkShaderModule> shaderModule, deUint32 group)
{
+ addShader(shaderStage, makeVkSharedPtr(shaderModule), group);
+}
+
+void RayTracingPipeline::addShader (VkShaderStageFlagBits shaderStage, de::SharedPtr<Move<VkShaderModule>> shaderModule, deUint32 group)
+{
if (group >= m_shadersGroupCreateInfos.size())
{
for (size_t groupNdx = m_shadersGroupCreateInfos.size(); groupNdx <= group; ++groupNdx)
DE_NULL, // const void* pNext;
(VkPipelineShaderStageCreateFlags)0, // VkPipelineShaderStageCreateFlags flags;
shaderStage, // VkShaderStageFlagBits stage;
- *shaderModule, // VkShaderModule module;
+ **shaderModule, // VkShaderModule module;
"main", // const char* pName;
DE_NULL, // const VkSpecializationInfo* pSpecializationInfo;
};
m_shaderCreateInfos.push_back(shaderCreateInfo);
}
- m_shadersModules.push_back(makeVkSharedPtr(shaderModule));
+ m_shadersModules.push_back(shaderModule);
}
void RayTracingPipeline::addLibrary (de::SharedPtr<de::MovePtr<RayTracingPipeline>> pipelineLibrary)
void addShader (VkShaderStageFlagBits shaderStage,
Move<VkShaderModule> shaderModule,
deUint32 group);
+ void addShader (VkShaderStageFlagBits shaderStage,
+ de::SharedPtr<Move<VkShaderModule>> shaderModule,
+ deUint32 group);
void addLibrary (de::SharedPtr<de::MovePtr<RayTracingPipeline>> pipelineLibrary);
Move<VkPipeline> createPipeline (const DeviceInterface& vk,
const VkDevice device,
de::MovePtr<RayTracingPipeline> rayTracingPipeline = de::newMovePtr<RayTracingPipeline>();
Move<VkShaderModule> raygenShader = createShaderModule(vkd, device, m_context.getBinaryCollection().get("rgen"), 0);
- Move<VkShaderModule> hitShader = createShaderModule(vkd, device, m_context.getBinaryCollection().get("ahit"), 0);
+ de::SharedPtr<Move<VkShaderModule>> hitShader = makeVkSharedPtr(createShaderModule(vkd, device, m_context.getBinaryCollection().get("ahit"), 0));
Move<VkShaderModule> missShader = createShaderModule(vkd, device, m_context.getBinaryCollection().get("miss"), 0);
Move<VkShaderModule> intersectionShader = createShaderModule(vkd, device, m_context.getBinaryCollection().get("sect"), 0);
rayTracingPipeline->addShader(VK_SHADER_STAGE_RAYGEN_BIT_KHR, raygenShader, 0u);