Mesa (gallium-screen-context): wgl: Use pipe_screen::context_create.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sat May 2 07:58:00 UTC 2009


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Sat May  2 08:57:39 2009 +0100

wgl: Use pipe_screen::context_create.

---

 .../state_trackers/wgl/shared/stw_context.c        |   23 +------------------
 src/gallium/state_trackers/wgl/shared/stw_winsys.h |    3 --
 src/gallium/winsys/gdi/gdi_softpipe_winsys.c       |    8 -------
 3 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c
index 0b5dd78..3c3862d 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_context.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_context.c
@@ -34,11 +34,6 @@
 #include "state_tracker/st_context.h"
 #include "state_tracker/st_public.h"
 
-#ifdef DEBUG
-#include "trace/tr_screen.h"
-#include "trace/tr_context.h"
-#endif
-
 #include "shared/stw_device.h"
 #include "shared/stw_winsys.h"
 #include "shared/stw_framebuffer.h"
@@ -83,7 +78,6 @@ stw_create_layer_context(
    const struct stw_pixelformat_info *pf = NULL;
    struct stw_context *ctx = NULL;
    GLvisual *visual = NULL;
-   struct pipe_screen *screen = NULL;
    struct pipe_context *pipe = NULL;
    UINT_PTR hglrc = 0;
 
@@ -127,24 +121,11 @@ stw_create_layer_context(
    if (visual == NULL) 
       goto no_visual;
 
-   screen = stw_dev->screen;
-
-#ifdef DEBUG
-   /* Unwrap screen */
-   if(stw_dev->trace_running)
-      screen = trace_screen(screen)->screen;
-#endif
-
-   pipe = stw_dev->stw_winsys->create_context( screen );
+   assert(stw_dev->screen->context_create);
+   pipe = stw_dev->screen->context_create(stw_dev->screen);
    if (pipe == NULL) 
       goto no_pipe;
 
-#ifdef DEBUG
-   /* Wrap context */
-   if(stw_dev->trace_running)
-      pipe = trace_context_create(stw_dev->screen, pipe);
-#endif
-
    assert(!pipe->priv);
    pipe->priv = hdc;
 
diff --git a/src/gallium/state_trackers/wgl/shared/stw_winsys.h b/src/gallium/state_trackers/wgl/shared/stw_winsys.h
index c0bf82c..85b5dfa 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_winsys.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_winsys.h
@@ -41,9 +41,6 @@ struct stw_winsys
    struct pipe_screen *
    (*create_screen)( void );
 
-   struct pipe_context *
-   (*create_context)( struct pipe_screen *screen );
-
    void
    (*flush_frontbuffer)( struct pipe_screen *screen,
                          struct pipe_surface *surf,
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
index 3382652..0c4f03b 100644
--- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
+++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
@@ -260,13 +260,6 @@ gdi_softpipe_screen_create(void)
 }
 
 
-static struct pipe_context *
-gdi_softpipe_context_create(struct pipe_screen *screen)
-{
-   return softpipe_create(screen);
-}
-
-
 static void
 gdi_softpipe_flush_frontbuffer(struct pipe_screen *screen,
                                struct pipe_surface *surface,
@@ -302,7 +295,6 @@ gdi_softpipe_flush_frontbuffer(struct pipe_screen *screen,
 
 static const struct stw_winsys stw_winsys = {
    &gdi_softpipe_screen_create,
-   &gdi_softpipe_context_create,
    &gdi_softpipe_flush_frontbuffer
 };
 




More information about the mesa-commit mailing list