egl: Convert configs to use shifts and sizes instead of masks
authorKevin Strasser <kevin.strasser@intel.com>
Fri, 25 Jan 2019 00:32:48 +0000 (16:32 -0800)
committerAdam Jackson <ajax@nwnk.net>
Wed, 21 Aug 2019 18:36:57 +0000 (18:36 +0000)
commit7b4ed2b513efad86616e932eb4bca20557addc78
tree9379268ee850c2bac41c54eea8a10ae0a5b9aea1
parent3562f48c9d58793429fc5ea655b8b4629b495ce0
egl: Convert configs to use shifts and sizes instead of masks

Change dri2_add_config to take arrays of shifts and sizes, and compare with
those set in the dri config. Convert all platform driver masks
to shifts and sizes.

In order to handle older drivers, where shift attributes aren't available,
we fall back to the mask attributes and compute the shifts with ffs.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c
src/egl/drivers/dri2/platform_device.c
src/egl/drivers/dri2/platform_drm.c
src/egl/drivers/dri2/platform_surfaceless.c
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c
src/gbm/backends/dri/gbm_dri.c
src/gbm/backends/dri/gbm_driint.h