[Mesa-dev] [PATCH v3 020/104] nir: Support deref instructions in split_var_copies
Jason Ekstrand
jason at jlekstrand.net
Thu Apr 5 21:11:02 UTC 2018
On Thu, Apr 5, 2018 at 1:31 PM, Caio Marcelo de Oliveira Filho <
caio.oliveira at intel.com> wrote:
> > @@ -268,8 +288,30 @@ split_var_copies_impl(nir_function_impl *impl)
> > state.dead_ctx = ralloc_context(NULL);
> > state.progress = false;
> >
> > + nir_builder b;
> > + nir_builder_init(&b, impl);
> > +
> > nir_foreach_block(block, impl) {
> > split_var_copies_block(block, &state);
> > +
> > + nir_foreach_instr_safe(instr, block) {
> > + if (instr->type != nir_instr_type_intrinsic)
> > + continue;
> > +
> > + nir_intrinsic_instr *copy = nir_instr_as_intrinsic(instr);
> > + if (copy->intrinsic != nir_intrinsic_copy_deref)
> > + continue;
>
> Could you 'continue' here if glsl_type_is_vector_or_scalar() returns
> true for one of the srcs? If I understood correctly, it would avoid
> cluttering the 'progress'.
>
Yes, we could. That sounds like a good follow-on. I'd like to keep this
patch as close in behavior to the original as possible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180405/8e364b3c/attachment.html>
More information about the mesa-dev
mailing list