[Mesa-dev] [PATCH] i965/fs: Keep track of the register that hold delta_x/delta_y.

Kenneth Graunke kenneth at whitecape.org
Sun Aug 10 21:52:02 PDT 2014


On Sunday, August 10, 2014 07:06:01 PM Matt Turner wrote:
> They're needed in register allocation.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875
> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index cfe2073..5b7ad67 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -1769,6 +1769,20 @@ fs_visitor::compact_virtual_grfs()
>              inst->src[i].reg = remap_table[inst->src[i].reg];
>        }
>     }
> +
> +   /* Patch all the references to delta_x/delta_y, since they're used in
> +    * register allocation.
> +    */
> +   for (unsigned i = 0; i < ARRAY_SIZE(delta_x); i++) {
> +      if (delta_x->file == GRF && remap_table[delta_x->reg] != -1) {
> +         delta_x->reg = remap_table[delta_x->reg];
> +      }
> +   }
> +   for (unsigned i = 0; i < ARRAY_SIZE(delta_y); i++) {
> +      if (delta_y->file == GRF && remap_table[delta_y->reg] != -1) {
> +         delta_y->reg = remap_table[delta_y->reg];
> +      }
> +   }
>  }
>  
>  /*
> 

Fixes a regression since afe3d1556f6b77031f7025309511a0eea2a3e8df.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

Thanks for fixing this!
-------------- 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/20140810/3c8e11c2/attachment.sig>


More information about the mesa-dev mailing list