Clear spirv vector before generating spirv output
This makes spir-v generation idempotent.
This commit is contained in:
parent
7a2a1623d8
commit
d84255296c
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue