remove bogus assertion, change drawable updates

don't update driDrawable information until later at all
(blit needs fixing).
This commit is contained in:
Roland Scheidegger 2007-07-11 17:30:01 +02:00
parent eb2a896f68
commit fb67b1609e
4 changed files with 18 additions and 9 deletions

View file

@ -957,15 +957,22 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv)
intel_fb->swap_ust = ust;
}
if (dPriv && intel->lastStamp != dPriv->lastStamp) {
if (intel->revalidateDrawable) {
__DRIscreenPrivate *sPriv = intel->driScreen;
LOCK_HARDWARE(intel);
DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
intel->revalidateDrawable = GL_FALSE;
UNLOCK_HARDWARE(intel);
if (dPriv && intel->lastStamp != dPriv->lastStamp) {
/* XXX this doesn't appear to work quite right.
And in any case, it will never get called with single buffered
rendering here...
And if it's only a window move (not resize), don't need to do anything. */
if (INTEL_DEBUG & DEBUG_LOCK)
_mesa_printf("doing defered drawable update\n");
intelWindowMoved(intel);
intel->lastStamp = dPriv->lastStamp;
if (INTEL_DEBUG & DEBUG_LOCK)
_mesa_printf("doing defered drawable update\n");
intelWindowMoved(intel);
intel->lastStamp = dPriv->lastStamp;
}
}
}
else {

View file

@ -673,7 +673,8 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
* checking must be done *after* this call:
*/
if (dPriv)
DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
intel->revalidateDrawable = GL_TRUE;
// DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
if (sarea->width != intelScreen->width ||
sarea->height != intelScreen->height ||
@ -727,6 +728,7 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
}
#endif
#if 0
/* Drawable changed?
*/
if (dPriv && intel->lastStamp != dPriv->lastStamp) {
@ -735,6 +737,7 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
/* intelWindowMoved(intel);
intel->lastStamp = dPriv->lastStamp;*/
}
#endif
}

View file

@ -273,6 +273,7 @@ struct intel_context
drmI830Sarea *sarea;
GLuint lastStamp;
GLuint revalidateDrawable;
/**
* Configuration cache

View file

@ -176,7 +176,7 @@ intel_get_pointer(GLcontext * ctx, struct gl_renderbuffer *rb,
/**
* Called via glRenderbufferStorageEXT() to set the format and allocate
* storage for a user-created renderbuffer.
* storage for a user-created (or priv buffer) renderbuffer.
*/
static GLboolean
intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
@ -188,8 +188,6 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
GLboolean softwareBuffer = GL_FALSE;
int cpp;
ASSERT(rb->Name != 0);
switch (internalFormat) {
case GL_R3_G3_B2:
case GL_RGB4: