glsl: set vertex/fragment program Ids to aid with debugging
authorBrian Paul <brianp@vmware.com>
Fri, 8 May 2009 18:18:44 +0000 (12:18 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 8 May 2009 18:45:08 +0000 (12:45 -0600)
src/mesa/shader/slang/slang_link.c

index 1fdf4db054c3a722d521f0e041621bed571f7fb2..798eb13f20ee4b7ed966b56d5e8a2ea9a4ef8768 100644 (file)
@@ -712,6 +712,8 @@ _slang_link(GLcontext *ctx,
       struct gl_vertex_program *linked_vprog =
          vertex_program(_mesa_clone_program(ctx, &vertProg->Base));
       shProg->VertexProgram = linked_vprog; /* refcount OK */
+      /* vertex program ID not significant; just set Id for debugging purposes */
+      shProg->VertexProgram->Base.Id = shProg->Name;
       ASSERT(shProg->VertexProgram->Base.RefCount == 1);
    }
 
@@ -720,6 +722,8 @@ _slang_link(GLcontext *ctx,
       struct gl_fragment_program *linked_fprog = 
          fragment_program(_mesa_clone_program(ctx, &fragProg->Base));
       shProg->FragmentProgram = linked_fprog; /* refcount OK */
+      /* vertex program ID not significant; just set Id for debugging purposes */
+      shProg->FragmentProgram->Base.Id = shProg->Name;
       ASSERT(shProg->FragmentProgram->Base.RefCount == 1);
    }