I recently discovered a bug in my geometry shader branch wherein we were responding to certain kinds of link errors by calling linker_error(), but the program was still linking successfully. The root cause turned out to be that during the first half of the execution of link_shaders(), it was not sufficient to call linker_error()--the code had to also tell link_shaders() (through boolean return values) that the link had failed. During the second half link_shaders(), calling linker_error() was sufficient.
This patch series cleans things up so that calling linker_error() is always sufficient to make the link fail, regardless of where execution is in link_shaders(). The cleanup happens in patch 3/5. In the process of making this fix, I also discovered one case where we were flagging the link error by returning false to link_shaders(), but we weren't calling linker_error(). As a result, the link would fail (as it should) but there would be no error message in the log. That is fixed in patch 2/5. Patch 1/5 removes some dead code which would have otherwise made the clean-up harder to follow. Patch 4/5 improves an error message that was previously vague because we were calling linker_error() from a point where we didn't have much information. Finally, patch 5/5 removes some redundant code. [PATCH 1/5] glsl: Remove bogus check on return value of link_uniform_blocks(). [PATCH 2/5] glsl: Add error message for intrastage interface block mismatch. [PATCH 3/5] glsl: Use a consistent technique for tracking link success/failure. [PATCH 4/5] glsl: Improve error message for interstage interface block mismatch. [PATCH 5/5] glsl: Remove redundant writes to prog->LinkStatus _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev