mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
Clear spirv vector before generating spirv output
This makes spir-v generation idempotent.
This commit is contained in:
parent
7a2a1623d8
commit
d84255296c
@ -95,6 +95,8 @@ GLSLANG_EXPORT void glslang_program_SPIRV_generate_with_options(glslang_program_
|
|||||||
|
|
||||||
const glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage));
|
const glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage));
|
||||||
|
|
||||||
|
program->spirv.clear();
|
||||||
|
|
||||||
glslang::GlslangToSpv(*intermediate, program->spirv, &logger, reinterpret_cast<glslang::SpvOptions*>(spv_options));
|
glslang::GlslangToSpv(*intermediate, program->spirv, &logger, reinterpret_cast<glslang::SpvOptions*>(spv_options));
|
||||||
|
|
||||||
program->loggerMessages = logger.getAllMessages();
|
program->loggerMessages = logger.getAllMessages();
|
||||||
|
Loading…
Reference in New Issue
Block a user