nir/validate: Allow 32-bit boolean load/store intrinsics
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 9 Mar 2019 21:05:25 +0000 (15:05 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 15 Mar 2019 01:02:19 +0000 (01:02 +0000)
commitb315f6f82b8ae4ce64627dcae0e549f45cd320dd
tree2c019ecc6fcc81e7c4414f2d02a0822520bd1409
parent5d26f2d3d59d0f995eabacbe32870779d7730c53
nir/validate: Allow 32-bit boolean load/store intrinsics

With UBOs and SSBOs we have boolean types but they're actually 32-bit
values.  Make the validator a little less strict so that we can do a
32-bit load/store on boolean types.  We're about to add a lowering pass
called gl_nir_lower_buffers which will lower boolean load/store
operations to 32-bit and insert i2b and b2i instructions to convert
to/from 1-bit booleans.  We want that to be legal.

Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir/nir_validate.c