case PCI_CHIP_I945_GM:
chipset = "Intel(R) 945GM";
break;
+ case PCI_CHIP_I945_GME:
+ chipset = "Intel(R) 945GME";
+ break;
+ case PCI_CHIP_G33_G:
+ chipset = "Intel(R) G33";
+ break;
+ case PCI_CHIP_Q35_G:
+ chipset = "Intel(R) Q35";
+ break;
+ case PCI_CHIP_Q33_G:
+ chipset = "Intel(R) Q33";
+ break;
default:
chipset = "Unknown Intel Chipset";
break;
#if 1 /* XXX FBO temporary? */
{"GL_EXT_packed_depth_stencil", NULL},
#endif
+ {"GL_EXT_pixel_buffer_object", NULL},
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_stencil_wrap", NULL},
{"GL_EXT_texture_edge_clamp", NULL},
* Check if we need to rotate/warp the front color buffer to the
* rotated screen. We generally need to do this when we get a glFlush
* or glFinish after drawing to the front color buffer.
+ * If no rotation, just copy the private fake front buffer to the real one.
*/
static void
-intelCheckFrontRotate(GLcontext * ctx)
+intelCheckFrontUpdate(GLcontext * ctx)
{
struct intel_context *intel = intel_context(ctx);
+ /* rely on _ColorDrawBufferMask being kept up to date by mesa
+ even for window-fbos. */
+ /* not sure. Might need that for all masks including
+ BUFFER_BIT_FRONT_LEFT maybe? */
if (intel->ctx.DrawBuffer->_ColorDrawBufferMask[0] ==
BUFFER_BIT_FRONT_LEFT) {
intelScreenPrivate *screen = intel->intelScreen;
+ __DRIdrawablePrivate *dPriv = intel->driDrawable;
if (screen->current_rotation != 0) {
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
intelRotateWindow(intel, dPriv, BUFFER_BIT_FRONT_LEFT);
}
+ else {
+ intelCopyBuffer(dPriv, NULL);
+ }
}
}
intelglFlush(GLcontext * ctx)
{
intelFlush(ctx);
- intelCheckFrontRotate(ctx);
+ intelCheckFrontUpdate(ctx);
}
void
driFenceUnReference(intel->batch->last_fence);
intel->batch->last_fence = NULL;
}
- intelCheckFrontRotate(ctx);
+ intelCheckFrontUpdate(ctx);
}
drmI830Sarea *saPriv = (drmI830Sarea *)
(((GLubyte *) sPriv->pSAREA) + intelScreen->sarea_priv_offset);
int fthrottle_mode;
+ GLboolean havePools;
+
+ DRM_LIGHT_LOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
+ havePools = intelCreatePools(intelScreen);
+ DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
+
+ if (!havePools)
+ return GL_FALSE;
if (!_mesa_initialize_context(&intel->ctx,
mesaVis, shareCtx,
__DRIdrawablePrivate * driReadPriv)
{
+#if 0
+ if (driDrawPriv) {
+ fprintf(stderr, "x %d, y %d, width %d, height %d\n",
+ driDrawPriv->x, driDrawPriv->y, driDrawPriv->w, driDrawPriv->h);
+ }
+#endif
+
if (driContextPriv) {
struct intel_context *intel =
(struct intel_context *) driContextPriv->driverPrivate;
(struct intel_framebuffer *) driDrawPriv->driverPrivate;
GLframebuffer *readFb = (GLframebuffer *) driReadPriv->driverPrivate;
+ /* this is a hack so we have a valid context when the region allocation
+ is done. Need a per-screen context? */
+ intel->intelScreen->dummyctxptr = intel;
/* XXX FBO temporary fix-ups! */
/* if the renderbuffers don't have regions, init them from the context */
}
}
- /* set GLframebuffer size to match window, if needed */
+ /* update GLframebuffer size to match window if needed */
driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
if (driReadPriv != driDrawPriv) {
- driUpdateFramebufferSize(&intel->ctx, driReadPriv);
+ driUpdateFramebufferSize(&intel->ctx, driReadPriv);
}
_mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);
&intel_fb->vbl_seq);
intel->driDrawable = driDrawPriv;
intelWindowMoved(intel);
+ intel->lastStamp = driDrawPriv->lastStamp;
+ }
+ else if (intel->lastStamp != driDrawPriv->lastStamp) {
+ intel_draw_buffer(&intel->ctx, &intel_fb->Base);
}
-
- intel_draw_buffer(&intel->ctx, &intel_fb->Base);
}
}
else {
intelUpdateScreenRotation(sPriv, sarea);
}
+#if 0
if (sarea->width != intel->width ||
sarea->height != intel->height ||
sarea->rotation != intel->current_rotation) {
intel->height = sarea->height;
intel->current_rotation = sarea->rotation;
}
-
- /* Drawable changed?
- */
- if (dPriv && intel->lastStamp != dPriv->lastStamp) {
- intelWindowMoved(intel);
- intel->lastStamp = dPriv->lastStamp;
- }
+#endif
}