Commit f1293b2f9bc3 split apart buffer block arrays but introduced also the possibility of a recount of active blocks (NumUniformBlocks/NumShaderStorageBlocks) which would be incoherent with the actual amount of active blocks (UniformBlocks/ShaderStorageBlocks) in the program.
This could cause a segmentation fault if trying to use the index of a block in a link failed program. Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Timothy Arceri <tarc...@itsqueeze.com> --- src/compiler/glsl/linker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index b6f8bc4212e..bb9c101f430 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1181,6 +1181,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog, for (unsigned k = 0; k <= i; k++) { delete[] InterfaceBlockStageIndex[k]; } + *num_blks = 0; return false; } -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev