First pass for rewriting the build system

* Refactored all CMake files
* Started working on compiling shaders to header files in CMake

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
Fabian Sauter 2022-05-18 21:10:21 +02:00
parent c6a2b022f9
commit b95df8d0a0
33 changed files with 559 additions and 2712 deletions

19
test/shaders/Utils.hpp Normal file
View file

@ -0,0 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <cstdint>
#include <string>
#include <vector>
/**
* Compile a single glslang source from string value. This is only meant
* to be used for testing as it's non threadsafe, and it had to be removed
* from the glslang dependency and now can only run the CLI directly due to
* license issues: see https://github.com/KomputeProject/kompute/pull/235
*
* @param source An individual raw glsl shader in string format
* @return The compiled SPIR-V binary in unsigned int32 format
*/
std::vector<uint32_t>
compileSource(const std::string& source);