dri2: Fix bug in attribute handling for non-desktop OpenGL contexts
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Jul 2012 21:26:24 +0000 (14:26 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 6 Aug 2012 22:37:04 +0000 (15:37 -0700)
commit63adb6b9eaa723f6bf9603f3f567e04451df857e
treee38014650a01a9fbfdb9e643bcfad581179aa05a
parent102617bc5206e459bb1743d2d72341dbfe77bc58
dri2: Fix bug in attribute handling for non-desktop OpenGL contexts

Previously an error would be generated if any attributes were specified when
creating a non-desktop OpenGL context.  This was a mistake, and it will
prevent old drivers from working with new EGL libraries that add support for
the createContextAttribs interface.  Instead, match the behavior of
EGL_KHR_create_context: allow versions that make sense, reject non-zero flags.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/common/dri_util.c