Re: [Mesa-dev] [PATCH 3/8] nir/builder: Add iadd_imm and imul_imm helpers

2018-11-14 Thread Karol Herbst
Reviewed-by: Karol Herbst On Wed, Nov 14, 2018 at 12:23 AM Jason Ekstrand wrote: > > The pattern of adding or multiplying an integer by an immediate is > fairly common especially in deref chain handling. This adds a helper > for it and uses it a few places. The advantage to the helper is that >

[Mesa-dev] [PATCH 3/8] nir/builder: Add iadd_imm and imul_imm helpers

2018-11-13 Thread Jason Ekstrand
The pattern of adding or multiplying an integer by an immediate is fairly common especially in deref chain handling. This adds a helper for it and uses it a few places. The advantage to the helper is that it automatically handles bit sizes for you. --- src/compiler/nir/nir_builder.h | 12 +++