Skip to content

Commit e01ab45

Browse files
Merge pull request #1351 from AnyOldName3/cherry-picked-fixes
Cherry picked fixes
2 parents 308d7c9 + 02dcb09 commit e01ab45

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/vsg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ set(LIBRARIES PUBLIC
268268
)
269269

270270
if (${VSG_SUPPORTS_ShaderCompiler})
271-
list(APPEND LIBRARIES PRIVATE glslang::glslang glslang::glslang-default-resource-limits glslang::SPIRV)
271+
list(INSERT LIBRARIES 0 PRIVATE glslang::glslang glslang::glslang-default-resource-limits glslang::SPIRV)
272272
endif()
273273

274274
# Check for std::atomic

src/vsg/io/VSG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ bool VSG::write(const vsg::Object* object, const vsg::Path& filename, ref_ptr<co
184184
}
185185
else if (ext == ".vsga" || ext == ".vsgt")
186186
{
187-
std::ofstream fout(filename);
187+
std::ofstream fout(filename, std::ios::out | std::ios::binary);
188188
writeHeader(fout, FormatInfo{ASCII, version});
189189

190190
vsg::AsciiOutput output(fout, options);

src/vsg/utils/ShaderCompiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ bool ShaderCompiler::compile(ShaderStages& shaders, const std::vector<std::strin
282282
}
283283
}
284284

285+
vsg_shader->module->code.clear();
285286
glslang::GlslangToSpv(*(program->getIntermediate((EShLanguage)eshl_stage)), vsg_shader->module->code, &logger, &spvOptions);
286287
}
287288
}

0 commit comments

Comments
 (0)