summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-05-02 08:57:39 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-05-02 08:57:39 +0100
commitda71847ea6414d7e352c6094f8963bb4eda344dc (patch)
treedb3be545cd341eb9d98c919762126274244fe7bf
parent2595a188f93fd903600ef5d8517737ee0592035d (diff)
wgl: Use pipe_screen::context_create.gallium-screen-context
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_context.c23
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_winsys.h3
-rw-r--r--src/gallium/winsys/gdi/gdi_softpipe_winsys.c8
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 0b5dd78ec6..3c3862df63 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 c0bf82c9ed..85b5dfaa4a 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 33826524d7..0c4f03b151 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
};