nir: Add a base const_index to shared atomic intrinsics.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Jul 2016 21:47:42 +0000 (14:47 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 22 Jul 2016 04:31:41 +0000 (21:31 -0700)
commitcf6f2d3ce72a8b9dac5830aaf518aeed17a3833d
tree4cc47d006b1b46a4491220795ad88961846840ec
parent91dde3ddcaf6ca5a7aa2d2e9815236ce2ddf698f
nir: Add a base const_index to shared atomic intrinsics.

Commit 52e75dcb8c04c0dde989970c4c587cbe8313f7cf made nir_lower_io
start using nir_intrinsic_set_base instead of writing const_index[0]
directly.  However, those intrinsics apparently don't /have/ a base,
so this caused assert failures.

However, the old code was happily setting non-existent const_index
fields, so it was pretty bogus too.

Jason pointed out that load_shared and store_shared have a base,
and that the i965 driver uses that field.  So presumably atomics
should have one as well, so that loads/stores/atomics all refer
to variables with consistent addressing.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/nir/nir_intrinsics.h