Merge pull request #241 from KomputeProject/240_win_helpers
Extend shader helper functions in tests to support windows
This commit is contained in:
commit
fab1bafd67
3 changed files with 7 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -187,4 +187,5 @@ release/
|
|||
swiftshader/
|
||||
vk_swiftshader_icd.json
|
||||
tmp_kp_shader.comp.spv
|
||||
tmp_kp_shader.comp
|
||||
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -118,10 +118,11 @@ vs_cmake:
|
|||
-DKOMPUTE_OPT_INSTALL=1 \
|
||||
-DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=0 \
|
||||
-DKOMPUTE_OPT_BUILD_TESTS=1 \
|
||||
-DKOMPUTE_OPT_BUILD_DOCS=1 \
|
||||
-DKOMPUTE_OPT_BUILD_SHADERS=1 \
|
||||
-DKOMPUTE_OPT_BUILD_SINGLE_HEADER=1 \
|
||||
-DKOMPUTE_OPT_ENABLE_SPDLOG=1 \
|
||||
-DKOMPUTE_OPT_CODE_COVERAGE=0 \
|
||||
-DKOMPUTE_OPT_BUILD_DOCS=0 \
|
||||
-G "Visual Studio 16 2019"
|
||||
|
||||
vs_build_all:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ std::vector<uint32_t>
|
|||
compileSource(
|
||||
const std::string& source)
|
||||
{
|
||||
if (system(std::string("glslangValidator --stdin -S comp -V -o tmp_kp_shader.comp.spv << END\n" + source + "\nEND").c_str()))
|
||||
std::ofstream fileOut("tmp_kp_shader.comp");
|
||||
fileOut << source;
|
||||
fileOut.close();
|
||||
if (system(std::string("glslangValidator -V tmp_kp_shader.comp -o tmp_kp_shader.comp.spv").c_str()))
|
||||
throw std::runtime_error("Error running glslangValidator command");
|
||||
std::ifstream fileStream("tmp_kp_shader.comp.spv", std::ios::binary);
|
||||
std::vector<char> buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue