Hi Eric, On Sat, 18 Aug 2018 at 13:58, Eric Engestrom <eric.engest...@intel.com> wrote: > The original issue spotted was an upcast done after a bitwise ops, but > since the same logic is done in multiple place, Emil suggested adding > a helper to avoid mistakes.
Works for me. The original issue we had was not so much with the upcast, but conversion from signed to unsigned. The casts were put in to prevent sign extension when s32 from attribs or queries were widened to 64 bits. The helper seems bulletproof: taking the arguments as u32 guarantees we'll never get sign extension since the arguments are never treated as signed. Might be worth a note in the commit about signedness. Reviewed-by: Daniel Stone <dani...@collabora.com> Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev