diff --git a/.pick_status.json b/.pick_status.json index b39cb0a02f7..0a46b318698 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3324,7 +3324,7 @@ "description": "util: fix UBSan error with _mesa_bfloat16_bits_to_float", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ecd2d2cf46dfc3305a6dc1497815b7b54eef513e", "notes": null diff --git a/src/util/bfloat.h b/src/util/bfloat.h index 886d55fb8ba..013c38e7e24 100644 --- a/src/util/bfloat.h +++ b/src/util/bfloat.h @@ -63,7 +63,7 @@ static inline float _mesa_bfloat16_bits_to_float(uint16_t bf) { union fi x; - x.ui = bf << 16; + x.ui = (uint32_t)bf << 16; return x.f; }