gallium: squash-merge of gallium screen context
[mesa.git] / src / gallium / state_trackers / wgl / stw_context.c
index f2f0264844a73c26707904c487022ff298fdb9a5..0785d2c6b859f2436e52bb726ed9c8bac5d06b2b 100644 (file)
 #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 "stw_icd.h"
 #include "stw_device.h"
 #include "stw_winsys.h"
@@ -152,7 +147,6 @@ DrvCreateLayerContext(
    const struct stw_pixelformat_info *pfi;
    GLvisual visual;
    struct stw_context *ctx = NULL;
-   struct pipe_screen *screen = NULL;
    struct pipe_context *pipe = NULL;
    
    if(!stw_dev)
@@ -175,28 +169,12 @@ DrvCreateLayerContext(
    ctx->hdc = hdc;
    ctx->iPixelFormat = iPixelFormat;
 
-   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 );
+   /* priv == hdc, pass to stw_flush_frontbuffer as context_private
+    */
+   pipe = stw_dev->screen->context_create( stw_dev->screen, hdc );
    if (pipe == NULL) 
       goto no_pipe;
 
-#ifdef DEBUG
-   /* Wrap context */
-   if(stw_dev->trace_running)
-      pipe = trace_context_create(stw_dev->screen, pipe);
-#endif
-
-   /* pass to stw_flush_frontbuffer as context_private */
-   assert(!pipe->priv);
-   pipe->priv = hdc;
-
    ctx->st = st_create_context( pipe, &visual, NULL );
    if (ctx->st == NULL) 
       goto no_st_ctx;