summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2007-07-11 17:30:01 +0200
committerRoland Scheidegger <[email protected]>2007-07-11 17:30:01 +0200
commitfb67b1609e211ed16828e10ffc1c36e54f655112 (patch)
tree3c7d77f79f284dce394e5e8d91497a19dedf9da6 /src/mesa
parenteb2a896f68e5402764955a30b949d8408d435e73 (diff)
remove bogus assertion, change drawable updates
don't update driDrawable information until later at all (blit needs fixing).
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_buffers.c17
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c5
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.h1
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_fbo.c4
4 files changed, 18 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c
index 4e4f0d14c65..67f992e4a21 100644
--- a/src/mesa/drivers/dri/i915tex/intel_buffers.c
+++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c
@@ -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 {
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 4b96cd7b7ec..aa2078e762a 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -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
}
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.h b/src/mesa/drivers/dri/i915tex/intel_context.h
index d05b20abbd4..7b97c564a3e 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.h
+++ b/src/mesa/drivers/dri/i915tex/intel_context.h
@@ -273,6 +273,7 @@ struct intel_context
drmI830Sarea *sarea;
GLuint lastStamp;
+ GLuint revalidateDrawable;
/**
* Configuration cache
diff --git a/src/mesa/drivers/dri/i915tex/intel_fbo.c b/src/mesa/drivers/dri/i915tex/intel_fbo.c
index d3f14bcd258..2dd3617f93a 100644
--- a/src/mesa/drivers/dri/i915tex/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915tex/intel_fbo.c
@@ -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: