Mesa (gallium-screen-context): glx/xlib: simplify creation of trace-wrapped contexts

Keith Whitwell keithw at kemper.freedesktop.org
Thu Feb 4 16:31:46 UTC 2010


Module: Mesa
Branch: gallium-screen-context
Commit: 838c5cfe56b2af6c644909bed3c5e7cdd64c336a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=838c5cfe56b2af6c644909bed3c5e7cdd64c336a

Author: Keith Whitwell <keithw at vmware.com>
Date:   Thu Feb  4 16:23:20 2010 +0000

glx/xlib: simplify creation of trace-wrapped contexts

Trace screen knows how to properly wrap context creation in the
wrapped screen, so nothing special to do here.

---

 src/gallium/state_trackers/glx/xlib/xm_api.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 4f32662..65f55f1 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -760,7 +760,6 @@ PUBLIC
 XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
 {
    static GLboolean firstTime = GL_TRUE;
-   struct pipe_context *_pipe = NULL;
    struct pipe_context *pipe = NULL;
    XMesaContext c;
    GLcontext *mesaCtx;
@@ -788,24 +787,13 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
    if (screen == NULL)
       goto fail;
 
-   /* Bottom level driver takes xmesa_context as its private structure
+   /* Trace screen knows how to properly wrap context creation in the
+    * wrapped screen, so nothing special to do here:
     */
-   _pipe = _screen->context_create(_screen, (void *) c);
+   pipe = screen->context_create(screen, (void *) c);
    if (_pipe == NULL)
       goto fail;
 
-   /* Trace driver takes wrapped driver as its private data.  Trace
-    * screen knows this.
-    *
-    * XXX: need a wrappable accessor function for retrieving the
-    * ctx->private data.
-    *
-    * XXX: todo: make trace wrap the driver struct and hide all this.
-    */
-   pipe = screen->context_create(screen, (void *)_pipe);
-   if (pipe == NULL)
-      goto fail;
-
    c->st = st_create_context(pipe, 
                              &v->mesa_visual,
                              share_list ? share_list->st : NULL);




More information about the mesa-commit mailing list