Hi Eric,

On Sat, 18 Aug 2018 at 13:58, Eric Engestrom <[email protected]> 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 <[email protected]>

Cheers,
Daniel
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to