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/mesa/drivers/dri/r200/r200_context.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/mesa/drivers/dri/r200/r200_context.c') diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index b2e1f36e187..8da9438541e 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -212,20 +212,6 @@ GLboolean r200CreateContext( gl_api api, int i; int tcl_mode; - switch (api) { - case API_OPENGL_COMPAT: - if (major_version > 1 || minor_version > 3) { - *error = __DRI_CTX_ERROR_BAD_VERSION; - return GL_FALSE; - } - break; - case API_OPENGLES: - break; - default: - *error = __DRI_CTX_ERROR_BAD_API; - return GL_FALSE; - } - /* Flag filtering is handled in dri2CreateContextAttribs. */ (void) flags; -- cgit v1.2.3