diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-05-10 11:04:44 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-06-18 09:55:45 +0100 |
commit | 83821ece79011d21303058e30694dd3796d072f2 (patch) | |
tree | 7716101fd2a9978a28416ff284383f88d53f5ec4 /src/glx | |
parent | 88b887faa9209a58d29c819e01f9ad37ebc99a36 (diff) | |
download | external_mesa3d-83821ece79011d21303058e30694dd3796d072f2.zip external_mesa3d-83821ece79011d21303058e30694dd3796d072f2.tar.gz external_mesa3d-83821ece79011d21303058e30694dd3796d072f2.tar.bz2 |
glx: Add an error message when a direct renderer's createScreen() routine fails
because no matching fbConfigs or visuals could be found.
Nearly all the error cases in *createScreen() issue an error message to diagnose
the failure to initialize before branching to handle_error. The few remaining
error cases which don't should probably do the same.
(At the moment, it seems this can be triggered in drisw with an X server which
reports definite values for MAX_PBUFFFER_(WIDTH|HEIGHT|SIZE), because those
attributes are checked for an exact match against 0.)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri2_glx.c | 4 | ||||
-rw-r--r-- | src/glx/dri3_glx.c | 4 | ||||
-rw-r--r-- | src/glx/dri_glx.c | 4 | ||||
-rw-r--r-- | src/glx/drisw_glx.c | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index bd7ed8b..462d560 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -1263,8 +1263,10 @@ dri2CreateScreen(int screen, struct glx_display * priv) configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs); visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs); - if (!configs || !visuals) + if (!configs || !visuals) { + ErrorMessageF("No matching fbConfigs or visuals found\n"); goto handle_error; + } glx_config_destroy_list(psc->base.configs); psc->base.configs = configs; diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 3d8a662..55eed39 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -1741,8 +1741,10 @@ dri3_create_screen(int screen, struct glx_display * priv) configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs); visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs); - if (!configs || !visuals) + if (!configs || !visuals) { + ErrorMessageF("No matching fbConfigs or visuals found\n"); goto handle_error; + } glx_config_destroy_list(psc->base.configs); psc->base.configs = configs; diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 04a0847..5295331 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -460,8 +460,10 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc, configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs); visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs); - if (!configs || !visuals) + if (!configs || !visuals) { + ErrorMessageF("No matching fbConfigs or visuals found\n"); goto handle_error; + } glx_config_destroy_list(psc->base.configs); psc->base.configs = configs; diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 5885b66..fcb5d8f 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -733,8 +733,10 @@ driswCreateScreen(int screen, struct glx_display *priv) configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs); visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs); - if (!configs || !visuals) + if (!configs || !visuals) { + ErrorMessageF("No matching fbConfigs or visuals found\n"); goto handle_error; + } glx_config_destroy_list(psc->base.configs); psc->base.configs = configs; |