mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
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@jlekstrand.net>
This commit is contained in:
parent
d3e046e76c
commit
06fbcd2cd5
1 changed files with 2 additions and 8 deletions
|
|
@ -544,14 +544,8 @@ convert_color_for_store(nir_builder *b, const struct gen_device_info *devinfo,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ISL_SFLOAT:
|
case ISL_SFLOAT:
|
||||||
if (image.bits[0] == 16) {
|
if (image.bits[0] == 16)
|
||||||
nir_ssa_def *f16comps[4];
|
color = nir_pack_half_2x16_split(b, color, nir_imm_float(b, 0));
|
||||||
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;
|
break;
|
||||||
|
|
||||||
case ISL_UINT:
|
case ISL_UINT:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue