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>
This commit is contained in:
Jon TURNEY 2014-05-10 11:04:44 +01:00
parent 88b887faa9
commit 83821ece79
4 changed files with 12 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;