egl: add helper to combine two u32 into one u64
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 16 Aug 2018 14:22:46 +0000 (15:22 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 21 Aug 2018 14:50:02 +0000 (15:50 +0100)
commit2de9e841e7ad983a5cac2da2abfdf13d8689f5ca
tree4541ab933af036710018ca2eb1a00473467e7ab3
parent1ca23420c1c334f91c2a3e69fdd3ae24f189a41f
egl: add helper to combine two u32 into one u64

Use a helper to avoid the common issues of upcasting after the right shift
(losing the upper bits) and shifting signed values (sign gets shifted too).

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c