diff --git a/.pick_status.json b/.pick_status.json index bc575565cda..b94d87cdd85 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -544,7 +544,7 @@ "description": "nir/lower_blend: Fix nir_blend_logicop() for 8/16-bit integer formats", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f3de2bd6c2dd4c6b4bdbd63e7e5d47f326d2f494", "notes": null diff --git a/src/compiler/nir/nir_lower_blend.c b/src/compiler/nir/nir_lower_blend.c index c35d33817a7..b38f3c330f5 100644 --- a/src/compiler/nir/nir_lower_blend.c +++ b/src/compiler/nir/nir_lower_blend.c @@ -319,9 +319,12 @@ nir_blend_logicop( if (util_format_is_float(format) || util_format_is_srgb(format)) return src; + nir_alu_type type = + util_format_is_pure_integer(format) ? nir_type_uint : nir_type_float; + if (bit_size != 32) { - src = nir_f2f32(b, src); - dst = nir_f2f32(b, dst); + src = nir_convert_to_bit_size(b, src, type, 32); + dst = nir_convert_to_bit_size(b, dst, type, 32); } assert(src->num_components <= 4); @@ -358,8 +361,8 @@ nir_blend_logicop( assert(util_format_is_pure_integer(format)); } - if (bit_size == 16) - out = nir_f2f16(b, out); + if (bit_size != 32) + out = nir_convert_to_bit_size(b, out, type, bit_size); return out; }