[Mesa-dev] [PATCH 3/3] glx: Generate fewer errors in MakeContextCurrent
Adam Jackson
ajax at redhat.com
Fri Oct 4 06:30:26 PDT 2013
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.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
src/glx/glxcurrent.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 3d8893c..a6884cf 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();
--
1.8.3.1
More information about the mesa-dev
mailing list