mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
move intelScreenContext() to intel_swapbuffers.c and make static
This commit is contained in:
parent
070aad3a9d
commit
5ff1ff2b55
3 changed files with 22 additions and 26 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue