diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 13 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 779741e32e3..92cac73d5bc 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -438,6 +438,19 @@ dri_init_screen_helper(struct dri_screen *screen, dri_postprocessing_init(screen); + /* gallium drivers don't declare what version of GL they support, so we + * check the computed Mesa context version after context creation and fail + * out then. + */ + if (screen->st_api->profile_mask & ST_PROFILE_DEFAULT_MASK) + screen->sPriv->max_gl_compat_version = 30; + if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_CORE_MASK) + screen->sPriv->max_gl_core_version = 32; + if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES1_MASK) + screen->sPriv->max_gl_es1_version = 11; + if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES2_MASK) + screen->sPriv->max_gl_es2_version = 30; + return dri_fill_in_modes(screen); } diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 919ba6dc2a0..56479686366 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -897,14 +897,6 @@ dri2_init_screen(__DRIscreen * sPriv) if (!configs) goto fail; - sPriv->api_mask = 0; - if (screen->st_api->profile_mask & ST_PROFILE_DEFAULT_MASK) - sPriv->api_mask |= 1 << __DRI_API_OPENGL; - if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES1_MASK) - sPriv->api_mask |= 1 << __DRI_API_GLES; - if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES2_MASK) - sPriv->api_mask |= 1 << __DRI_API_GLES2; - screen->auto_fake_front = dri_with_format(sPriv); screen->broken_invalidate = !sPriv->dri2.useInvalidate; screen->lookup_egl_image = dri2_lookup_egl_image; |