diff options
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/resource9.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/resource9.c b/src/gallium/state_trackers/nine/resource9.c index c5837241747..852801624a9 100644 --- a/src/gallium/state_trackers/nine/resource9.c +++ b/src/gallium/state_trackers/nine/resource9.c @@ -79,7 +79,7 @@ NineResource9_ctor( struct NineResource9 *This, if (This->info.target != PIPE_BUFFER) { This->size = util_resource_size(&This->info); - This->base.device->available_texture_mem -= This->size; + p_atomic_add(&This->base.device->available_texture_mem, -This->size); if (This->base.device->available_texture_mem <= This->base.device->available_texture_limit) { return D3DERR_OUTOFVIDEOMEMORY; @@ -111,7 +111,7 @@ NineResource9_dtor( struct NineResource9 *This ) /* NOTE: size is 0, unless something has actually been allocated */ if (This->base.device) - This->base.device->available_texture_mem += This->size; + p_atomic_add(&This->base.device->available_texture_mem, This->size); NineUnknown_dtor(&This->base); } |