From 251a067993658fd02f158fef36476f898c238e3c Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 2 Feb 2015 10:41:06 +0100 Subject: [PATCH] ephyr: Fail if glamor is requested but not usable Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- hw/kdrive/ephyr/hostx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index f64861b50..8e1487738 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -1407,9 +1407,12 @@ ephyr_glamor_init(ScreenPtr screen) ephyr_glamor_set_window_size(scrpriv->glamor, scrpriv->win_width, scrpriv->win_height); - glamor_init(screen, - GLAMOR_USE_SCREEN | - GLAMOR_USE_PICTURE_SCREEN); + if (!glamor_init(screen, + GLAMOR_USE_SCREEN | + GLAMOR_USE_PICTURE_SCREEN)) { + FatalError("Failed to initialize glamor\n"); + return FALSE; + } return TRUE; }