modesetting: Move GBM code inside #ifdef GLAMOR_HAS_GBM

Fixes a compilation error without Glamor.

Bugzilla: https://bugs.gentoo.org/653288
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Matt Turner 2018-04-15 23:37:45 -07:00 committed by Adam Jackson
parent c3ae963a7b
commit a98a95b798

View File

@ -998,18 +998,18 @@ static Bool
drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
unsigned width, unsigned height, unsigned bpp)
{
uint32_t format;
if (drmmode->scrn->depth == 30)
format = GBM_FORMAT_ARGB2101010;
else
format = GBM_FORMAT_ARGB8888;
bo->width = width;
bo->height = height;
#ifdef GLAMOR_HAS_GBM
if (drmmode->glamor) {
uint32_t format;
if (drmmode->scrn->depth == 30)
format = GBM_FORMAT_ARGB2101010;
else
format = GBM_FORMAT_ARGB8888;
#ifdef GBM_BO_WITH_MODIFIERS
uint32_t num_modifiers;
uint64_t *modifiers = NULL;