summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/shader_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 4ff032d4ec..505c7bb46f 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -1517,12 +1517,14 @@ static void
_mesa_link_program(GLcontext *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 (ctx->TransformFeedback.Active && shProg == ctx->Shader.CurrentProgram) {
+ if (obj->Active && shProg == ctx->Shader.CurrentProgram) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glLinkProgram(transform feedback active");
return;
@@ -1591,8 +1593,10 @@ void
_mesa_use_program(GLcontext *ctx, GLuint program)
{
struct gl_shader_program *shProg;
+ struct gl_transform_feedback_object *obj =
+ ctx->TransformFeedback.CurrentObject;
- if (ctx->TransformFeedback.Active) {
+ if (obj->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUseProgram(transform feedback active)");
return;