diff options
-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; } }; |