summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2011-07-08 08:26:29 +0200
committerThomas Hellstrom <[email protected]>2011-07-08 08:37:42 +0200
commita65e9706035c0e348307e76fdeeed0910ec8c68e (patch)
treeb7a36cfaebf86db110fe3b823f9844a152098b40 /src/mesa
parent8c1a2e128ea44bae6dc89524116c4a170cdc2b37 (diff)
mesa/st: Fix piglit read-front with new drawable invalidation v2
When the state tracker adds a front buffer, nothing triggers a validate drawable call, since the state tracker manager is never notified. Force a validate drawable call by invalidating the framebuffer's stamp, so that the window system's renderbuffer (if any) is picked up. This fixes bug 38988 https://bugs.freedesktop.org/show_bug.cgi?id=38988 Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index a8c4b5c3f49..7bd82aae206 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -918,6 +918,15 @@ st_manager_add_color_renderbuffer(struct st_context *st,
return FALSE;
st_framebuffer_update_attachments(stfb);
+
+ /*
+ * Force a call to the state tracker manager to validate the
+ * new renderbuffer. It might be that there is a window system
+ * renderbuffer available.
+ */
+ if(stfb->iface)
+ stfb->iface_stamp = p_atomic_read(&stfb->iface->stamp) - 1;
+
st_invalidate_state(st->ctx, _NEW_BUFFERS);
return TRUE;