Module: wine Branch: master Commit: dfeded6460ce067fe1c0540306c2964a170bed2a URL: https://source.winehq.org/git/wine.git/?a=commit;h=dfeded6460ce067fe1c054030...
Author: Jan Sikorski jsikorski@codeweavers.com Date: Thu Oct 7 12:57:27 2021 +0200
wined3d: Use atomic instructions for resource view bind counts.
Signed-off-by: Jan Sikorski jsikorski@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/wined3d_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 657b6acee39..56c90ba6606 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4157,8 +4157,8 @@ struct wined3d_resource
struct list resource_list_entry;
- uint32_t srv_bind_count_device; - uint32_t rtv_bind_count_device; + int32_t srv_bind_count_device; + int32_t rtv_bind_count_device; };
static inline ULONG wined3d_resource_incref(struct wined3d_resource *resource) @@ -6329,22 +6329,22 @@ static inline bool wined3d_rtv_all_subresources(const struct wined3d_rendertarge
static inline void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv) { - ++srv->resource->srv_bind_count_device; + InterlockedIncrement(&srv->resource->srv_bind_count_device); }
static inline void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv) { - --srv->resource->srv_bind_count_device; + InterlockedDecrement(&srv->resource->srv_bind_count_device); }
static inline void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv) { - ++rtv->resource->rtv_bind_count_device; + InterlockedIncrement(&rtv->resource->rtv_bind_count_device); }
static inline void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv) { - --rtv->resource->rtv_bind_count_device; + InterlockedDecrement(&rtv->resource->rtv_bind_count_device); }
static inline bool wined3d_rtv_overlaps_srv(const struct wined3d_rendertarget_view *rtv,