[Mesa-dev] [PATCH] i965/fs: Don't set dependency hints on instructions with spilled destinations

Kenneth Graunke kenneth at whitecape.org
Mon Oct 27 17:46:45 PDT 2014


On Monday, October 27, 2014 05:14:30 PM Jason Ekstrand wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> index da6da16..e48a4c6 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> @@ -881,6 +881,14 @@ fs_visitor::spill_reg(int spill_reg)
>           inst->dst.reg = spill_src.reg;
>           inst->dst.reg_offset = 0;
>  
> +         /* If we're immediately spilling the register, we should not use
> +          * destination dependency hints.  Doing so will cause the GPU do
> +          * try to read and write the register at the same time and may
> +          * hang the GPU.
> +          */
> +         inst->no_dd_clear = false;
> +         inst->no_dd_check = false;
> +
>  	 /* If our write is going to affect just part of the
>            * inst->regs_written(), then we need to unspill the destination
>            * since we write back out all of the regs_written().
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141027/56749a32/attachment.sig>


More information about the mesa-dev mailing list