Closed bjornbytes closed 4 months ago
While I like this idea, this is technically a break in backwards compatibility, albeit in a case that I don't think should be too useful to anyone, so I'm curious if anyone else has any opinions on this.
If it helps, here's the use case for my project: I am creating a single program object, adding vertex and fragment shaders to it, linking, and then querying the SPIR-V blob for each stage. The vertex stage comes back valid, but the SPIR-V generated for the fragment stage is a concatenation of the vertex and fragment stages, which is invalid.
I'm going to let this sit for just a bit longer before I merge it in case anyone else has any comments, but I suspect that any potential comments would only come after I merge the change. Though I don't expect anyone to be relying on the current behavior, you never know.
Each time you call
glslang_program_SPIRV_generate
, it appends the output to whatever has been previously generated. Here's an example:Before this change, the example prints:
With this change, it prints: