From 6a93f4208400c692360175c513c86a256020c693 Mon Sep 17 00:00:00 2001 From: Mark Oliver Mints <mmints@uni-koblenz.de> Date: Wed, 9 Jun 2021 11:53:05 +0200 Subject: [PATCH] [#65][Add] Create Compute Pipeline to Core class --- include/vkcv/Core.hpp | 11 +++++++++++ src/vkcv/Core.cpp | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/include/vkcv/Core.hpp b/include/vkcv/Core.hpp index 8a165adf..fbd1cc9c 100644 --- a/include/vkcv/Core.hpp +++ b/include/vkcv/Core.hpp @@ -157,6 +157,17 @@ namespace vkcv [[nodiscard]] PipelineHandle createGraphicsPipeline(const PipelineConfig &config); + /** + * Creates a basic vulkan compute pipeline using @p shader program and returns it using the @p handle. + * Fixed Functions for pipeline are set with standard values. + * + * @param shader program that hold the compiles compute shader + * @param handle a handle to return the created vulkan handle + * @return True if pipeline creation was successful, False if not + */ + [[nodiscard]] + PipelineHandle createComputePipeline(const ShaderProgram &config); + /** * Creates a basic vulkan render pass using @p config from the render pass config class and returns it using the @p handle. * Fixed Functions for pipeline are set with standard values. diff --git a/src/vkcv/Core.cpp b/src/vkcv/Core.cpp index 9ed83d2a..05782111 100644 --- a/src/vkcv/Core.cpp +++ b/src/vkcv/Core.cpp @@ -101,6 +101,11 @@ namespace vkcv return m_PipelineManager->createPipeline(config, *m_PassManager); } + PipelineHandle Core::createComputePipeline(const ShaderProgram &shaderProgram) + { + return m_PipelineManager->createComputePipeline(shaderProgram); + } + PassHandle Core::createPass(const PassConfig &config) { -- GitLab