glsl: added some link debug code (disabled)
authorBrian Paul <brianp@vmware.com>
Mon, 14 Sep 2009 23:32:03 +0000 (17:32 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 14 Sep 2009 23:32:03 +0000 (17:32 -0600)
src/mesa/shader/shader_api.c

index c36fc271a00f3fc3097d5f70ec8cae792da42316..4d5d1bef3dfc981b3298bab72cf0f8dd86b6c227 100644 (file)
@@ -1471,6 +1471,21 @@ _mesa_link_program(GLcontext *ctx, GLuint program)
    FLUSH_VERTICES(ctx, _NEW_PROGRAM);
 
    _slang_link(ctx, program, shProg);
+
+   /* debug code */
+   if (0) {
+      GLuint i;
+
+      _mesa_printf("Link %u shaders in program %u: %s\n",
+                   shProg->NumShaders, shProg->Name,
+                   shProg->LinkStatus ? "Success" : "Failed");
+
+      for (i = 0; i < shProg->NumShaders; i++) {
+         _mesa_printf(" shader %u, type 0x%x\n",
+                      shProg->Shaders[i]->Name,
+                      shProg->Shaders[i]->Type);
+      }
+   }
 }