[Mesa-dev] [PATCH 00/19] AMD support for NIR deref instructions.

Dave Airlie airlied at gmail.com
Tue May 15 00:07:51 UTC 2018


On 13 May 2018 at 10:19, Bas Nieuwenhuizen <bas at 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 <airlied at redhat.com>

Dave.


More information about the mesa-dev mailing list