mesa: add some minor fixes for geometry shaders
authorBrian Paul <brianp@vmware.com>
Fri, 3 Jun 2011 02:56:23 +0000 (20:56 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Jun 2011 03:49:49 +0000 (21:49 -0600)
src/mesa/main/shaderapi.c

index cbfbac802969be9e2c2c44a4718a9ccbb22848eb..b58e30de9c4c14f3cd24c396c5507f50c6634dfa 100644 (file)
@@ -925,6 +925,8 @@ print_shader_info(const struct gl_shader_program *shProg)
       printf("  vert prog %u\n", shProg->VertexProgram->Base.Id);
    if (shProg->FragmentProgram)
       printf("  frag prog %u\n", shProg->FragmentProgram->Base.Id);
+   if (shProg->GeometryProgram)
+      printf("  geom prog %u\n", shProg->GeometryProgram->Base.Id);
 }
 
 
@@ -1075,6 +1077,7 @@ validate_shader_program(const struct gl_shader_program *shProg,
                         char *errMsg)
 {
    const struct gl_vertex_program *vp = shProg->VertexProgram;
+   const struct gl_geometry_program *gp = shProg->GeometryProgram;
    const struct gl_fragment_program *fp = shProg->FragmentProgram;
 
    if (!shProg->LinkStatus) {
@@ -1104,6 +1107,9 @@ validate_shader_program(const struct gl_shader_program *shProg,
    if (vp && !validate_samplers(&vp->Base, errMsg)) {
       return GL_FALSE;
    }
+   if (gp && !validate_samplers(&gp->Base, errMsg)) {
+      return GL_FALSE;
+   }
    if (fp && !validate_samplers(&fp->Base, errMsg)) {
       return GL_FALSE;
    }