diff options
author | Luca Barbieri <[email protected]> | 2010-09-22 13:21:13 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-09-22 13:21:13 +0200 |
commit | d092c0c60ddcb56f8c5d2786ae3b61f5339b84e1 (patch) | |
tree | 564d52032ff611aad964f45aa1e40964c15e462c /src | |
parent | 6d0c39ce360609a0dc05abb63573452ab81c00e6 (diff) |
d3d1x: add missing memory barrier
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h index 19ac53e6bd3..55cbd4a7199 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; } }; |