On Tuesday, May 8, 2018 10:09:29 AM PDT Lionel Landwerlin wrote:
> Invalidating the indirect state pointers might affect a previously
> scheduled & still running 3DPRIMITIVE (causing page fault). So stall
> on pixel scoreboard before that.
> 
> v2: Fix compile issue :(
> 
> v3: Stall on pixel scoreboard
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
> Fixes: ca19ee33d7d39 ("i965/gen10: Ignore push constant packets during 
> context restore.")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106243
> ---
>  src/mesa/drivers/dri/i965/brw_pipe_control.c | 8 ++++++--
>  1 file changed, 6 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..1a32e9a8e96 100644
> --- a/src/mesa/drivers/dri/i965/brw_pipe_control.c
> +++ b/src/mesa/drivers/dri/i965/brw_pipe_control.c
> @@ -349,13 +349,17 @@ 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 at pixel scoreboard to make sure the
> + * constants have been loaded into the EUs prior to disable the push 
> constants
> + * so that it doesn't hang a previous 3DPRIMITIVE.
>   */
>  void
>  gen10_emit_isp_disable(struct brw_context *brw)
>  {
> +   brw_emit_end_of_pipe_sync(brw, PIPE_CONTROL_STALL_AT_SCOREBOARD);
>     brw_emit_pipe_control(brw,
> -                         PIPE_CONTROL_ISP_DIS |
> -                         PIPE_CONTROL_CS_STALL,
> +                         PIPE_CONTROL_ISP_DIS,
>                           NULL, 0, 0);
>  
>     brw->vs.base.push_constants_dirty = true;
> 

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to