diff options
author | Eric Anholt <[email protected]> | 2011-12-29 18:24:02 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-01-06 09:17:04 -0800 |
commit | 7f91c8bf2bf08afd297314c02a8869d8919f5f0e (patch) | |
tree | f3509804d25fec8381003758efd086eb10a525f1 /src/mesa/drivers/dri/i965/gen7_sol_state.c | |
parent | c4089d444a1736dba0c3d9c389ac216ce8711da8 (diff) |
i965/gen7: Flush the batch between transform feedbacks.
We need the kernel to reset our pointers to 0 in between. Note that
the initialization of function pointer had to move to after
InitContext since we didn't have intel->gen set up yet.
Fixes piglit EXT_transform_feedback/immediate-reuse
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_sol_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sol_state.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index c4e0622a6e0..81ffc0e7ade 100644 --- a/src/mesa/drivers/dri/i965/gen7_sol_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c @@ -264,3 +264,19 @@ const struct brw_tracked_state gen7_sol_state = { }, .emit = upload_sol_state, }; + +void +gen7_end_transform_feedback(struct gl_context *ctx, + struct gl_transform_feedback_object *obj) +{ + /* Because we have to rely on the kernel to reset our SO write offsets, and + * we only get to do it once per batchbuffer, flush the batch after feedback + * so another transform feedback can get the write offset reset it needs. + * + * This also covers any cache flushing required. + */ + struct brw_context *brw = brw_context(ctx); + struct intel_context *intel = &brw->intel; + + intel_batchbuffer_flush(intel); +} |