From 083f66fdd6451648fe355b64b02b29a6a4389f0d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 26 Sep 2013 12:01:56 -0700 Subject: dri: Move API version validation into dri/common. i965, i915, radeon, r200, swrast, and nouveau were mostly trying to do the same logic, except where they failed to. Notably, swrast had code that appeared to try to enable GLES1/2 but forgot to set api_mask (thus preventing any gles context from being created), and the non-intel drivers didn't support MESA_GL_VERSION_OVERRIDE. nouveau still relies on _mesa_compute_version(), because I don't know what its limits actually are, and gallium drivers don't declare limits up front at all. I think I've heard talk about doing so, though. v2: Compat max version should be 30 (noted by Ken) Drop r100's custom max version check, too (noted by Emil Velikov) Reviewed-by: Kenneth Graunke --- src/gallium/state_trackers/dri/drm/dri2.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/gallium/state_trackers/dri/drm') 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; -- cgit v1.2.3