On 13 May 2018 at 10:19, Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> wrote:
> This implements support in radv and radeonsi for NIR deref
> instructions instead of deref chains.
>
> It contains 4 parts:
> - patch 1 is a fixup for the initial series by Jason
> - Add support everywhere for instruction based derefs
> - Stop lowering them to deref chains (may need to be synchronized
>   with other drivers and core nir code to keep things bisectable)
> - Remove support for deref chains.

Okay I've read over this and I'm pretty happy with it.

I do wonder if we could lower the impact on some of the code by
adding the wrappers functions and getting var in a few places.

i.e. instead of
+      nir_variable *var = uses_deref_chain ? instr->variables[0]->var :
+
nir_deref_instr_get_variable(nir_instr_as_deref(instr->src[0].ssa->parent_instr);
-       int idx = instr->variables[0]->var->data.driver_location;
+       int idx = var->data.driver_location;

We could do a first pass patch that adds the var =
instr->variables[0]; and removes
the instr->variables[0] references elsewhere.

Up to you though, not sure how much extra work it would generate.

Also for Jason, strct is less chars than struct_type, but I expect the
number of times you typo it might end up more keystrokes :-P

For the series:
Reviewed-by: Dave Airlie <airl...@redhat.com>

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

Reply via email to