summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2011-06-29 14:49:57 +0200
committerThomas Hellstrom <[email protected]>2011-06-29 15:03:52 +0200
commit5d2fad5444ebe0e2a66c49bd6254e2bc81618f6e (patch)
treeb251e5216b4a86d9fdb68c747657bcd7ec1f7697 /src/gallium/state_trackers
parent19789e403ca3d0171d18f3c862738225902315e9 (diff)
st/glx: Fix compilation error
Fix compilation error due to commit "Rework how drawables are invalidated v3" Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c6
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_st.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index ab4f6753e11..1be6dd910b8 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -59,6 +59,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
+#include "util/u_atomic.h"
#include "xm_public.h"
#include <GL/glx.h>
@@ -1113,10 +1114,7 @@ XMesaDestroyBuffer(XMesaBuffer b)
void
xmesa_notify_invalid_buffer(XMesaBuffer b)
{
- XMesaContext xmctx = XMesaGetCurrentContext();
-
- if (xmctx && xmctx->xm_buffer == b)
- xmctx->st->notify_invalid_framebuffer(xmctx->st, b->stfb);
+ p_atomic_inc(&b->stfb->stamp);
}
diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c
index 6bfe8b0788c..ec3f531f7df 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_st.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_st.c
@@ -30,6 +30,7 @@
#include "xm_st.h"
#include "util/u_inlines.h"
+#include "util/u_atomic.h"
struct xmesa_st_framebuffer {
XMesaDisplay display;
@@ -302,6 +303,7 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
stfbi->visual = &xstfb->stvis;
stfbi->flush_front = xmesa_st_framebuffer_flush_front;
stfbi->validate = xmesa_st_framebuffer_validate;
+ p_atomic_set(&stfbi->stamp, 1);
stfbi->st_manager_private = (void *) xstfb;
return stfbi;