summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/transformfeedback.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-06 15:41:19 -0700
committerKenneth Graunke <[email protected]>2013-09-12 10:19:10 -0700
commit2b71b3d4666b076ef45d03b9b4b4c527bda21e1c (patch)
treef56915e1c03885c3aea2157fa177dcb57afb2338 /src/mesa/main/transformfeedback.h
parent9cc74c93f8983f978e7315e021eb59dfaca6404b (diff)
mesa: Disallow relinking if a program is used by an active XFB object.
Paused transform feedback objects may refer to a program other than the current program. If any active objects refer to a program, LinkProgram must reject the request to relink. The code to detect this is ugly since _mesa_HashWalk is awkward to use, but unfortunately we can't use hash_table_foreach since there's no way to get at the underlying struct hash_table (and even then, we'd need to handle locking somehow). Fixes the last subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.h')
-rw-r--r--src/mesa/main/transformfeedback.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h
index f6dc2a7b359..0ffaab50801 100644
--- a/src/mesa/main/transformfeedback.h
+++ b/src/mesa/main/transformfeedback.h
@@ -120,4 +120,8 @@ _mesa_is_xfb_active_and_unpaused(const struct gl_context *ctx)
!ctx->TransformFeedback.CurrentObject->Paused;
}
+extern bool
+_mesa_transform_feedback_is_using_program(struct gl_context *ctx,
+ struct gl_shader_program *shProg);
+
#endif /* TRANSFORM_FEEDBACK_H */