From eae63a32a22ab96691f2773cb0e36165518d3e96 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Thu, 8 Oct 2020 07:51:33 +0100 Subject: [PATCH] Updated algorithm to have option to build for both resultvalue and result --- src/Algorithm.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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);