diff options
author | Brian Paul <[email protected]> | 2009-10-08 09:28:07 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-08 09:28:07 -0600 |
commit | f67bc2e87255298ac22e8ccd98f482cc62d0ec26 (patch) | |
tree | c529b62cd2febd8ebab70ecf6a5df54a53b2ef72 /src | |
parent | f7455ad7af09b5ef31ccc454b79422a13c59af9a (diff) | |
parent | f7fb30f03badf7f3ac5d66e87acb8cbb1c5aee0b (diff) |
Merge branch 'mesa_7_6_branch'
Conflicts:
src/mesa/drivers/common/meta.c
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/glx_api.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/common/meta.c | 38 | ||||
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 10 |
3 files changed, 16 insertions, 42 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 556eefb1b17..f2881b9a31e 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -1311,13 +1311,15 @@ glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) { + int op, ev, err; /* Mesa's GLX isn't really an X extension but we try to act like one. */ - (void) dpy; + if (!XQueryExtension(dpy, GLX_EXTENSION_NAME, &op, &ev, &err)) + ev = err = 0; if (errorBase) - *errorBase = 0; + *errorBase = err; if (eventBase) - *eventBase = 0; - return True; + *eventBase = ev; + return True; /* we're faking GLX so always return success */ } diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index e1732241b3a..02e771c8d83 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -303,40 +303,10 @@ _mesa_meta_init(GLcontext *ctx) void _mesa_meta_free(GLcontext *ctx) { - struct gl_meta_state *meta = ctx->Meta; - - if (_mesa_get_current_context()) { - /* if there's no current context, these textures, buffers, etc should - * still get freed by _mesa_free_context_data(). - */ - - /* the temporary texture */ - _mesa_DeleteTextures(1, &meta->TempTex.TexObj); - - /* glBlitFramebuffer */ - _mesa_DeleteBuffersARB(1, & meta->Blit.VBO); - _mesa_DeleteVertexArraysAPPLE(1, &meta->Blit.ArrayObj); - _mesa_DeletePrograms(1, &meta->Blit.DepthFP); - - /* glClear */ - _mesa_DeleteBuffersARB(1, & meta->Clear.VBO); - _mesa_DeleteVertexArraysAPPLE(1, &meta->Clear.ArrayObj); - - /* glCopyPixels */ - _mesa_DeleteBuffersARB(1, & meta->CopyPix.VBO); - _mesa_DeleteVertexArraysAPPLE(1, &meta->CopyPix.ArrayObj); - - /* glDrawPixels */ - _mesa_DeleteVertexArraysAPPLE(1, &meta->DrawPix.ArrayObj); - _mesa_DeletePrograms(1, &meta->DrawPix.DepthFP); - _mesa_DeletePrograms(1, &meta->DrawPix.StencilFP); - - /* glBitmap */ - _mesa_DeleteBuffersARB(1, & meta->Bitmap.VBO); - _mesa_DeleteVertexArraysAPPLE(1, &meta->Bitmap.ArrayObj); - _mesa_DeleteTextures(1, &meta->Bitmap.Tex.TexObj); - } - + /* Note: Any textures, VBOs, etc, that we allocate should get + * freed by the normal context destruction code. But this would be + * the place to free other meta data someday. + */ _mesa_free(ctx->Meta); ctx->Meta = NULL; } diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 525db3b7cb7..5c0084f37aa 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1639,13 +1639,15 @@ Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, static Bool Fake_glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) { + int op, ev, err; /* Mesa's GLX isn't really an X extension but we try to act like one. */ - (void) dpy; + if (!XQueryExtension(dpy, GLX_EXTENSION_NAME, &op, &ev, &err)) + ev = err = 0; if (errorBase) - *errorBase = 0; + *errorBase = err; if (eventBase) - *eventBase = 0; - return True; + *eventBase = ev; + return True; /* we're faking GLX so always return success */ } |