egl/drm: introduce drm_add_configs_for_visuals() helper
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 25 Aug 2016 13:00:50 +0000 (14:00 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 14 Oct 2016 11:53:39 +0000 (12:53 +0100)
commit36fe5900a4c3f098699acd09221ab31b74229580
tree447c8ed77df2aa4ff8630f9a4e330f0412b89024
parent23ed073aa4f87943f660edaa54b60da5a9f2dbb7
egl/drm: introduce drm_add_configs_for_visuals() helper

Factor out and rework the existing code so that it prints a debug
message if we have zero configs for any visual.

As a nice side effect we now provide a correct (sequential ID) when
creating a config (via dri2_add_config).

v2: Use correct comparison in loop conditional (Eric)
    Use valid C initializer (Gurchetan)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
src/egl/drivers/dri2/platform_drm.c