mesa: make _mesa_copy_string() non-static
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 36fe0a1..4ff032d 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -782,8 +782,11 @@
 }
 
 
-static GLint
-sizeof_glsl_type(GLenum type)
+/**
+ * Return the size of the given GLSL datatype, in floats (components).
+ */
+GLint
+_mesa_sizeof_glsl_type(GLenum type)
 {
    switch (type) {
    case GL_FLOAT:
@@ -828,7 +831,7 @@
    case GL_FLOAT_MAT4x3:
       return 16;  /* four float[4] vectors */
    default:
-      _mesa_problem(NULL, "Invalid type in sizeof_glsl_type()");
+      _mesa_problem(NULL, "Invalid type in _mesa_sizeof_glsl_type()");
       return 1;
    }
 }
@@ -912,7 +915,7 @@
 
    if (size)
       *size = attribs->Parameters[index].Size
-         / sizeof_glsl_type(attribs->Parameters[index].DataType);
+         / _mesa_sizeof_glsl_type(attribs->Parameters[index].DataType);
 
    if (type)
       *type = attribs->Parameters[index].DataType;
@@ -987,7 +990,7 @@
    }
 
    if (size) {
-      GLint typeSize = sizeof_glsl_type(param->DataType);
+      GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
       if ((GLint) param->Size > typeSize) {
          /* This is an array.
           * Array elements are placed on vector[4] boundaries so they're
@@ -1519,6 +1522,12 @@
    if (!shProg)
       return;
 
+   if (ctx->TransformFeedback.Active && shProg == ctx->Shader.CurrentProgram) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "glLinkProgram(transform feedback active");
+      return;
+   }
+
    FLUSH_VERTICES(ctx, _NEW_PROGRAM);
 
    _slang_link(ctx, program, shProg);
@@ -1583,6 +1592,12 @@
 {
    struct gl_shader_program *shProg;
 
+   if (ctx->TransformFeedback.Active) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "glUseProgram(transform feedback active)");
+      return;
+   }
+
    if (ctx->Shader.CurrentProgram &&
        ctx->Shader.CurrentProgram->Name == program) {
       /* no-op */
@@ -1771,7 +1786,7 @@
       const GLboolean isUniformBool = is_boolean_type(param->DataType);
       const GLboolean areIntValues = is_integer_type(type);
       const GLint slots = (param->Size + 3) / 4;
-      const GLint typeSize = sizeof_glsl_type(param->DataType);
+      const GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
       GLsizei k, i;
 
       if ((GLint) param->Size > typeSize) {
@@ -1960,7 +1975,7 @@
    GLuint src = 0;
    const struct gl_program_parameter * param = &program->Parameters->Parameters[index];
    const GLuint slots = (param->Size + 3) / 4;
-   const GLint typeSize = sizeof_glsl_type(param->DataType);
+   const GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
    GLint nr, nc;
 
    /* check that the number of rows, columns is correct */