Mesa (master): glsl: Fail linking if assign_attribute_locations fails

Ian Romanick idr at kemper.freedesktop.org
Fri Oct 8 21:24:58 UTC 2010


Module: Mesa
Branch: master
Commit: 4b5489dd6f6d21c9d2e3f3d6d6467dcd429264a2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4b5489dd6f6d21c9d2e3f3d6d6467dcd429264a2

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Oct  7 17:20:15 2010 -0700

glsl: Fail linking if assign_attribute_locations fails

---

 src/glsl/linker.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 4bb4e2a..bddf878 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1486,8 +1486,10 @@ link_shaders(GLcontext *ctx, struct gl_shader_program *prog)
        * FINISHME: GL_MAX_VERTEX_ATTRIBS.  GL_MAX_VERTEX_ATTRIBS must be
        * FINISHME: at least 16, so hardcode 16 for now.
        */
-      if (!assign_attribute_locations(prog, 16))
+      if (!assign_attribute_locations(prog, 16)) {
+	 prog->LinkStatus = false;
 	 goto done;
+      }
 
       if (prog->_NumLinkedShaders == 1)
 	 demote_unread_shader_outputs(prog->_LinkedShaders[0]);




More information about the mesa-commit mailing list