aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-18 08:09:44 +0200
committermarha <marha@users.sourceforge.net>2013-09-18 08:09:44 +0200
commit09bfe74fc7d4a6f97eddb034df371e66e314ea12 (patch)
treeb63caf666a8c36ddcc9a4202f7cecac49998e98d /mesalib/src/mesa/main/shaderapi.c
parent5a54fa6e45ee10cf58ee1b6d2eb5522a24bb8745 (diff)
parent7f669a708bd35bdf8e842f762ec68f9ad0ec0486 (diff)
downloadvcxsrv-09bfe74fc7d4a6f97eddb034df371e66e314ea12.tar.gz
vcxsrv-09bfe74fc7d4a6f97eddb034df371e66e314ea12.tar.bz2
vcxsrv-09bfe74fc7d4a6f97eddb034df371e66e314ea12.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 mesa pixman xserver git update 18 Sep 2013 Conflicts: pixman/pixman/pixman-sse2.c
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r--mesalib/src/mesa/main/shaderapi.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 4fe9d9ca2..4c0484aaf 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -42,6 +42,7 @@
#include "main/dispatch.h"
#include "main/enums.h"
#include "main/hash.h"
+#include "main/hash_table.h"
#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
@@ -812,19 +813,19 @@ static void
link_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
- struct gl_transform_feedback_object *obj =
- ctx->TransformFeedback.CurrentObject;
shProg = _mesa_lookup_shader_program_err(ctx, program, "glLinkProgram");
if (!shProg)
return;
- if (obj->Active
- && (shProg == ctx->Shader.CurrentVertexProgram
- || shProg == ctx->Shader.CurrentGeometryProgram
- || shProg == ctx->Shader.CurrentFragmentProgram)) {
+ /* From the ARB_transform_feedback2 specification:
+ * "The error INVALID_OPERATION is generated by LinkProgram if <program> is
+ * the name of a program being used by one or more transform feedback
+ * objects, even if the objects are not currently bound or are paused."
+ */
+ if (_mesa_transform_feedback_is_using_program(ctx, shProg)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glLinkProgram(transform feedback active)");
+ "glLinkProgram(transform feedback is using the program)");
return;
}
@@ -1872,6 +1873,7 @@ _mesa_copy_linked_program_data(gl_shader_type type,
dst_gp->InputType = src->Geom.InputType;
dst_gp->OutputType = src->Geom.OutputType;
dst_gp->UsesClipDistance = src->Geom.UsesClipDistance;
+ dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
}
break;
default: