On 16 August 2018 at 15:23, Eric Engestrom <[email protected]> wrote: > Signed-off-by: Eric Engestrom <[email protected]> > --- > src/egl/drivers/dri2/platform_wayland.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 0913394b365255f6af63..f1680495210987d57ba6 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -818,8 +818,8 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy, > __DRI_IMAGE_ATTRIB_MODIFIER_LOWER, > &mod_lo); > if (query) { > - modifier = (uint64_t) mod_hi << 32; > - modifier |= (uint64_t) (mod_lo & 0xffffffff); > + modifier = ((uint64_t) mod_hi) << 32; > + modifier |= ((uint64_t) mod_lo) & 0xffffffff; > } > } > > @@ -1192,8 +1192,8 @@ dmabuf_handle_modifier(void *data, struct > zwp_linux_dmabuf_v1 *dmabuf, > dri2_dpy->formats |= (1 << visual_idx); > > mod = u_vector_add(&dri2_dpy->wl_modifiers[visual_idx]); > - *mod = (uint64_t) modifier_hi << 32; > - *mod |= (uint64_t) (modifier_lo & 0xffffffff); > + *mod = ((uint64_t) modifier_hi) << 32u; > + *mod |= ((uint64_t) modifier_lo) & 0xffffffff; > } > Since we're bound to make the same mistake again, can we make this an inline helper in egl_dri2.h and reuse it in here + egl_dri2.c
Thanks Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
