Updated algorithm to have option to build for both resultvalue and result
This commit is contained in:
parent
3edb72be6a
commit
eae63a32a2
1 changed files with 11 additions and 0 deletions
|
|
@ -264,9 +264,20 @@ Algorithm::createPipeline(std::vector<uint32_t> specializationData)
|
|||
&pipelineCacheInfo, nullptr, this->mPipelineCache.get());
|
||||
this->mFreePipelineCache = true;
|
||||
|
||||
#ifdef KOMPUTE_CREATE_PIPELINE_RESULT_VALUE
|
||||
vk::ResultValue<vk::Pipeline> pipelineResult =
|
||||
this->mDevice->createComputePipeline(*this->mPipelineCache,
|
||||
pipelineInfo);
|
||||
|
||||
if (pipelineResult.result != vk::Result::eSuccess) {
|
||||
throw std::runtime_error("Failed to create pipeline result: " +
|
||||
vk::to_string(pipelineResult.result));
|
||||
}
|
||||
#else
|
||||
vk::Pipeline pipelineResult =
|
||||
this->mDevice->createComputePipeline(*this->mPipelineCache, pipelineInfo);
|
||||
this->mFreePipeline = true;
|
||||
#endif
|
||||
|
||||
this->mFreePipeline = true;
|
||||
this->mPipeline = std::make_shared<vk::Pipeline>(pipelineResult);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue