summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-01 14:14:53 -0600
committerBrian <[email protected]>2007-11-01 18:01:47 -0600
commitca123a69faa377571c3b22167f7d444a26a3f776 (patch)
treef32b6372c6e42357a8ed86952b973554ffb55348 /src/mesa/drivers
parentf8549e8f4f8bdfebcb4e0a2754df59b3fe4fdff7 (diff)
remove _mesa_init_driver_functions()
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index 6c880498e51..f8fe74ff1e4 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -29,8 +29,7 @@
#include "glheader.h"
#include "context.h"
#include "extensions.h"
-
-#include "drivers/common/driverfuncs.h"
+#include "framebuffer.h"
#include "i830_dri.h"
@@ -45,7 +44,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_context.h"
-#include "drirenderbuffer.h"
+/*#include "drirenderbuffer.h"*/
#include "vblank.h"
#include "utils.h"
#include "xmlpool.h" /* for symbolic values of enum-type options */
@@ -165,7 +164,7 @@ intelFlush(GLcontext * ctx)
static void
intelInitDriverFunctions(struct dd_function_table *functions)
{
- _mesa_init_driver_functions(functions);
+ memset(functions, 0, sizeof(*functions));
st_init_driver_functions(functions);
}
@@ -335,6 +334,24 @@ intelUnbindContext(__DRIcontextPrivate * driContextPriv)
return GL_TRUE;
}
+
+/**
+ * Copied/modified from drirenderbuffer.c
+ */
+static void
+updateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv)
+{
+ struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate;
+ if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) {
+ _mesa_resize_framebuffer(ctx, fb, dPriv->w, dPriv->h);
+ /* if the driver needs the hw lock for ResizeBuffers, the drawable
+ might have changed again by now */
+ assert(fb->Width == dPriv->w);
+ assert(fb->Height == dPriv->h);
+ }
+}
+
+
GLboolean
intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
__DRIdrawablePrivate * driDrawPriv,
@@ -360,10 +377,10 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
intel->intelScreen->dummyctxptr = intel;
/* update GLframebuffer size to match window if needed */
- driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
+ updateFramebufferSize(&intel->ctx, driDrawPriv);
if (driReadPriv != driDrawPriv) {
- driUpdateFramebufferSize(&intel->ctx, driReadPriv);
+ updateFramebufferSize(&intel->ctx, driReadPriv);
}
_mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);