nir: Make nir_deref_instr_build/get_const_offset actually use size_align.
authorEric Anholt <eric@anholt.net>
Sat, 5 Jan 2019 00:52:32 +0000 (16:52 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 8 Jan 2019 23:40:53 +0000 (15:40 -0800)
commit211b826790c499ba54e4cdf871b42e0b34b8f27d
treeef958f23bf024ce9ba47506afa76bd8c4d571b09
parent9f29d90327e343f5717a98ceb6df2cdbab5d0e0b
nir: Make nir_deref_instr_build/get_const_offset actually use size_align.

I think this was copy-and-paste mistake -- nir_opt_large_constants was
passing in glsl_get_natural_size_align_bytes() given brw_nir.c's arguments
to the opt pass.

I wanted to reuse this function for handling constant offsets of arrays of
images in V3D.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/compiler/nir/nir_deref.c