From fa6e2c1ed5b4cd79e470f4724c4a18b469820270 Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Tue, 15 Jun 2021 19:04:38 +0200 Subject: [PATCH] [#73] Used binary mode on Windows to fix edgy edge-cases Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp b/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp index 8418eff7..7214e208 100644 --- a/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp +++ b/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp @@ -177,7 +177,7 @@ namespace vkcv::shader { } static bool writeSpirvCode(const std::filesystem::path &shaderPath, const std::vector<uint32_t>& spirv) { - std::ofstream file (shaderPath.string(), std::ios::out); + std::ofstream file (shaderPath.string(), std::ios::out | std::ios::binary); if (!file.is_open()) { vkcv_log(LogLevel::ERROR, "The file could not be opened (%s)", shaderPath.string().c_str()); -- GitLab