From: Adam Jackson Date: Fri, 4 Oct 2013 13:25:51 +0000 (-0400) Subject: glx: Generate fewer errors in MakeContextCurrent X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e166a58c43e92f10f03b32747bff44708096f898;p=mesa.git glx: Generate fewer errors in MakeContextCurrent For a few reasons. 1: In the (current) common case, these conditionals are never true. All we're doing by checking them is slowing down MakeCurrent. The server does these checks already anyway. 2: GLX >= 3.0 contexts may legally be made current without a bound framebuffer. This does not fix piglit/glx-create-context-current-no-framebuffer, but is a prerequisite for fixing it. Cc: "9.1 9.2" Reviewed-by: Brian Paul Signed-off-by: Adam Jackson --- diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c index 3d8893cf9af..a6884cf8da2 100644 --- a/src/glx/glxcurrent.c +++ b/src/glx/glxcurrent.c @@ -231,16 +231,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, return GL_FALSE; } - if (gc == NULL && (draw != None || read != None)) { - __glXGenerateError(dpy, (draw != None) ? draw : read, - BadMatch, X_GLXMakeContextCurrent); - return False; - } - if (gc != NULL && (draw == None || read == None)) { - __glXGenerateError(dpy, None, BadMatch, X_GLXMakeContextCurrent); - return False; - } - _glapi_check_multithread(); __glXLock();