From e166a58c43e92f10f03b32747bff44708096f898 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 4 Oct 2013 09:25:51 -0400 Subject: 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 --- src/glx/glxcurrent.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3