nir: Pull some of intel's image load/store format conversion to nir_format.h
authorEric Anholt <eric@anholt.net>
Tue, 11 Dec 2018 21:49:28 +0000 (13:49 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 13 Dec 2018 00:09:43 +0000 (16:09 -0800)
commitd3e046e76c06978d92bc7311bf02926e888159dc
tree290ddcf14ba7a9cac905cc4e92e9930df8e120af
parent19c7cba2ab7d50908a0c6d39e90f78e4d1981618
nir: Pull some of intel's image load/store format conversion to nir_format.h

I needed the same functions for v3d.  Note that the color value in the
Intel lowering has already been cut down to image.chans num_components.

v2: Drop the half float one, since it was a 1-liner after cleanup.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_format_convert.h
src/intel/compiler/brw_nir_lower_image_load_store.c