Mesa (master): intel: Simplify the half-float packing in image load/store lowering.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 13 00:49:50 UTC 2018
Module: Mesa
Branch: master
Commit: 06fbcd2cd5cc5702c9039c26d20082a99bc157bf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=06fbcd2cd5cc5702c9039c26d20082a99bc157bf
Author: Eric Anholt <eric at anholt.net>
Date: Wed Dec 12 11:29:29 2018 -0800
intel: Simplify the half-float packing in image load/store lowering.
This was noted by Jason in review when I tried to make a helper for the
old path.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/compiler/brw_nir_lower_image_load_store.c | 10 ++--------
1 file changed, 2 insertions(+), 8 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 269dbf8e28..d1547c98c5 100644
--- a/src/intel/compiler/brw_nir_lower_image_load_store.c
+++ b/src/intel/compiler/brw_nir_lower_image_load_store.c
@@ -544,14 +544,8 @@ convert_color_for_store(nir_builder *b, const struct gen_device_info *devinfo,
break;
case ISL_SFLOAT:
- 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);
- }
+ if (image.bits[0] == 16)
+ color = nir_pack_half_2x16_split(b, color, nir_imm_float(b, 0));
break;
case ISL_UINT:
More information about the mesa-commit
mailing list