On 27/09/13 04:35, Eric Anholt wrote: > 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. > --- > src/gallium/state_trackers/dri/common/dri_screen.c | 13 +++++ > src/gallium/state_trackers/dri/drm/dri2.c | 8 --- > src/mesa/drivers/dri/common/dri_util.c | 68 > +++++++++++++++++++++- > src/mesa/drivers/dri/common/dri_util.h | 5 ++ > src/mesa/drivers/dri/i915/intel_context.c | 44 -------------- > src/mesa/drivers/dri/i915/intel_screen.c | 36 +++--------- > src/mesa/drivers/dri/i915/intel_screen.h | 5 -- > src/mesa/drivers/dri/i965/intel_context.c | 44 -------------- > src/mesa/drivers/dri/i965/intel_screen.c | 44 +++++--------- > src/mesa/drivers/dri/i965/intel_screen.h | 5 -- > src/mesa/drivers/dri/nouveau/nouveau_context.c | 23 -------- > src/mesa/drivers/dri/nouveau/nouveau_screen.c | 12 ++++ > src/mesa/drivers/dri/r200/r200_context.c | 14 ----- > src/mesa/drivers/dri/radeon/radeon_screen.c | 3 + > src/mesa/drivers/dri/swrast/swrast.c | 20 ++----- > 15 files changed, 125 insertions(+), 219 deletions(-) >
> diff --git a/src/mesa/drivers/dri/r200/r200_context.c > b/src/mesa/drivers/dri/r200/r200_context.c > index b2e1f36..8da9438 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; > - } > - AFAICS there is an identical hunk in radeon/radeon_context.c r100CreateContext that can be dropped as well. Cheers Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev