[Mesa-dev] [PATCH] nir: Don't try to to-SSA ALU instructions that are already SSA.
Jason Ekstrand
jason at jlekstrand.net
Wed Jan 28 20:31:00 PST 2015
I'm not super-familiar with Connor's to-SSA pass, but I think that does
what you want.
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
On Wed, Jan 28, 2015 at 5:09 PM, Eric Anholt <eric at anholt.net> wrote:
> ---
> The i965 driver apparently only has things all in ssa or all in non-ssa,
> while
> for TGSI I ended up doing some things directly in SSA before the to-SSA
> pass.
>
> src/glsl/nir/nir_to_ssa.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/glsl/nir/nir_to_ssa.c b/src/glsl/nir/nir_to_ssa.c
> index 9c577fa..dbe1699 100644
> --- a/src/glsl/nir/nir_to_ssa.c
> +++ b/src/glsl/nir/nir_to_ssa.c
> @@ -239,6 +239,9 @@ rewrite_alu_instr_forward(nir_alu_instr *instr,
> rewrite_state *state)
>
> nir_foreach_src(&instr->instr, rewrite_use, state);
>
> + if (instr->dest.dest.is_ssa)
> + return;
> +
> nir_register *reg = instr->dest.dest.reg.reg;
> unsigned index = reg->index;
>
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150128/33e55742/attachment.html>
More information about the mesa-dev
mailing list