glsl: Fail linking if assign_attribute_locations fails
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 8 Oct 2010 00:20:15 +0000 (17:20 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 8 Oct 2010 21:21:22 +0000 (14:21 -0700)
src/glsl/linker.cpp

index 4bb4e2a9945b101a9ae2107710b600aaab675c27..bddf8788b47a3f01d03f91040ca43511d5a10dd2 100644 (file)
@@ -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]);