summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-02 13:10:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-11-05 08:04:47 -0700
commit5ff1ff2b551821ccd90e85c4b8e7f32f60177adc (patch)
treeddb196de7b5308ff8f238c4d1cf3cb908cce07a9 /src/mesa/drivers/dri
parent070aad3a9d8433fb29f687f500ed6ba2336ab72f (diff)
move intelScreenContext() to intel_swapbuffers.c and make static
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c24
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_screen.h2
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c22
3 files changed, 22 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index dd646a432a..f0e654c0be 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -256,27 +256,3 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
return GL_TRUE;
}
-
-
-
-struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen)
-{
- /*
- * This should probably change to have the screen allocate a dummy
- * context at screen creation. For now just use the current context.
- */
-
- GET_CURRENT_CONTEXT(ctx);
- if (ctx == NULL) {
- /* need a context for the first time makecurrent is called (for hw lock
- when allocating priv buffers) */
- if (intelScreen->dummyctxptr == NULL) {
- _mesa_problem(NULL, "No current context in intelScreenContext\n");
- return NULL;
- }
- return intelScreen->dummyctxptr;
- }
-
- return intel_context(ctx);
-}
-
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_screen.h b/src/mesa/drivers/dri/intel_winsys/intel_screen.h
index 549587a6f2..12a5206200 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_screen.h
+++ b/src/mesa/drivers/dri/intel_winsys/intel_screen.h
@@ -97,8 +97,6 @@ extern struct _DriBufferPool *driBatchPoolInit(int fd, unsigned flags,
unsigned numBufs,
unsigned checkDelayed);
-extern struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen);
-
extern GLboolean
intelCreatePools(intelScreenPrivate *intelScreen);
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index f6e7e16000..a80b5a4198 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -38,6 +38,28 @@
#include "state_tracker/st_cb_fbo.h"
+static struct intel_context *
+intelScreenContext(intelScreenPrivate *intelScreen)
+{
+ /*
+ * This should probably change to have the screen allocate a dummy
+ * context at screen creation. For now just use the current context.
+ */
+
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx == NULL) {
+ /* need a context for the first time makecurrent is called (for hw lock
+ when allocating priv buffers) */
+ if (intelScreen->dummyctxptr == NULL) {
+ _mesa_problem(NULL, "No current context in intelScreenContext\n");
+ return NULL;
+ }
+ return intelScreen->dummyctxptr;
+ }
+
+ return intel_context(ctx);
+}
+
/**
* Return the pipe_surface for the given renderbuffer.