dril: use the super fallback path for software fallback

just in case gbm init fails somehow, swrast should still be able to
return some kind of fbconfigs

Fixes: ef88af8467 ("dril: always take the egl init path")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30979>
This commit is contained in:
Mike Blumenkrantz
2024-09-02 10:42:50 -04:00
committed by Marge Bot
parent 93a749c449
commit 06d417af80

View File

@@ -435,8 +435,13 @@ drilCreateNewScreen(int scrn, int fd,
const __DRIconfig ***driver_configs, void *data)
{
const __DRIconfig **configs = init_dri2_configs(fd);
if (!configs)
return NULL;
if (!configs && fd == -1) {
// otherwise set configs to point to our config list
configs = calloc(ARRAY_SIZE(drilConfigs) + 1, sizeof(void *));
for (int i = 0; i < ARRAY_SIZE(drilConfigs); i++) {
configs[i] = mem_dup(&drilConfigs[i], sizeof(drilConfigs[i]));
}
}
// outpointer it
*driver_configs = configs;