summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-13 11:25:08 -0800
committerEric Anholt <[email protected]>2018-12-13 12:24:24 -0800
commit3a417a044e9ce3ab2ee6f1647e9be24cf9d310f5 (patch)
tree5a184b629d1c1757b5a2c3140478befae2cd476b /src/intel/compiler
parentc2c44dba7a0ece017f672e13b71bea4519d5f4a5 (diff)
Revert "intel: Simplify the half-float packing in image load/store lowering."
This reverts commit 06fbcd2cd5cc5702c9039c26d20082a99bc157bf. nir_pack_half_2x16_split *isn't* vectorizable, it's 1-component only, thus why we had this split-scalar code in the first place. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_nir_lower_image_load_store.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_nir_lower_image_load_store.c b/src/intel/compiler/brw_nir_lower_image_load_store.c
index d1547c98c54..269dbf8e283 100644
--- a/src/intel/compiler/brw_nir_lower_image_load_store.c
+++ b/src/intel/compiler/brw_nir_lower_image_load_store.c
@@ -544,8 +544,14 @@ convert_color_for_store(nir_builder *b, const struct gen_device_info *devinfo,
break;
case ISL_SFLOAT:
- if (image.bits[0] == 16)
- color = nir_pack_half_2x16_split(b, color, nir_imm_float(b, 0));
+ if (image.bits[0] == 16) {
+ nir_ssa_def *f16comps[4];
+ for (unsigned i = 0; i < image.chans; i++) {
+ f16comps[i] = nir_pack_half_2x16_split(b, nir_channel(b, color, i),
+ nir_imm_float(b, 0));
+ }
+ color = nir_vec(b, f16comps, image.chans);
+ }
break;
case ISL_UINT: