Mesa (12.0): i965: Properly flush in hsw_pause_transform_feedback().
Emil Velikov
evelikov at kemper.freedesktop.org
Tue Jan 24 01:38:47 UTC 2017
Module: Mesa
Branch: 12.0
Commit: 806de4a22484cfa027af40e87742bd775a7c318f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=806de4a22484cfa027af40e87742bd775a7c318f
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Jan 6 00:09:53 2017 -0800
i965: Properly flush in hsw_pause_transform_feedback().
Fixes a number of transform feedback tests when run with Linux 4.8,
which allows us to use the MI_LOAD_REGISTER_REG command, at which point
we started using this new broken path.
ES3-CTS.functional.transform_feedback.array_element.interleaved.lines.*
and Piglit's arb_transform_feedback2/draw-auto are both fixed by this
patch, for example.
Thanks to Chris Wilson for catching this mistake!
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99030
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
(cherry picked from commit 2138347a45fa6dad1934b1c58a9e7d7f53194828)
---
src/mesa/drivers/dri/i965/hsw_sol.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/hsw_sol.c b/src/mesa/drivers/dri/i965/hsw_sol.c
index e299b02..b0dd150 100644
--- a/src/mesa/drivers/dri/i965/hsw_sol.c
+++ b/src/mesa/drivers/dri/i965/hsw_sol.c
@@ -201,6 +201,9 @@ hsw_pause_transform_feedback(struct gl_context *ctx,
(struct brw_transform_feedback_object *) obj;
if (brw->is_haswell) {
+ /* Flush any drawing so that the counters have the right values. */
+ brw_emit_mi_flush(brw);
+
/* Save the SOL buffer offset register values. */
for (int i = 0; i < BRW_MAX_XFB_STREAMS; i++) {
BEGIN_BATCH(3);
More information about the mesa-commit
mailing list