From d092c0c60ddcb56f8c5d2786ae3b61f5339b84e1 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Wed, 22 Sep 2010 13:21:13 +0200 Subject: d3d1x: add missing memory barrier --- .../state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h index 19ac53e6bd..55cbd4a719 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h @@ -363,8 +363,12 @@ struct dual_refcnt_t unsigned nonatomic_release() { //printf("%p nonatomic_release at %u %u\n", this, atomic_refcnt, nonatomic_refcnt); - if(!--nonatomic_refcnt && !atomic_refcnt && is_zero()) - return 0; + if(!--nonatomic_refcnt) + { + __sync_synchronize(); + if(!atomic_refcnt && is_zero()) + return 0; + } return 1; } }; -- cgit v1.2.3