From 6e00ce947519de15df413c1f878bc881435dd245 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 1 May 2018 12:32:45 +0100 Subject: [PATCH] i965: require post sync operation priot to ISP disable Invalidating the push constant pointers might affect a previously running 3DPRIMITIVE (causing page fault). So stall with a post sync operation before that. v2: Fix compile issue :( Signed-off-by: Lionel Landwerlin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106243 --- src/mesa/drivers/dri/i965/brw_pipe_control.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_pipe_control.c b/src/mesa/drivers/dri/i965/brw_pipe_control.c index 02278be6d62..9c5573d3110 100644 --- a/src/mesa/drivers/dri/i965/brw_pipe_control.c +++ b/src/mesa/drivers/dri/i965/brw_pipe_control.c @@ -349,13 +349,19 @@ gen7_emit_vs_workaround_flush(struct brw_context *brw) * context restore, so the mentioned hang doesn't happen. However, * software must program push constant commands for all stages prior to * rendering anything, so we flag them as dirty. + * + * Finally, we also make sure to stall prior to disable the push constants so + * that it doesn't affect a previous 3DPRIMITIVE. */ void gen10_emit_isp_disable(struct brw_context *brw) { brw_emit_pipe_control(brw, - PIPE_CONTROL_ISP_DIS | - PIPE_CONTROL_CS_STALL, + PIPE_CONTROL_CS_STALL | + PIPE_CONTROL_WRITE_IMMEDIATE, + brw->workaround_bo, 0, 0); + brw_emit_pipe_control(brw, + PIPE_CONTROL_ISP_DIS, NULL, 0, 0); brw->vs.base.push_constants_dirty = true; -- 2.17.0