diff --git a/src/Algorithm.cpp b/src/Algorithm.cpp index c2f4e72d4..0138201c7 100644 --- a/src/Algorithm.cpp +++ b/src/Algorithm.cpp @@ -264,9 +264,20 @@ Algorithm::createPipeline(std::vector specializationData) &pipelineCacheInfo, nullptr, this->mPipelineCache.get()); this->mFreePipelineCache = true; +#ifdef KOMPUTE_CREATE_PIPELINE_RESULT_VALUE + vk::ResultValue 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(pipelineResult);