Zebediah Figura : wined3d: Make the "counter_bo" field of struct wined3d_unordered_access_view a wined3d_bo pointer.
Alexandre Julliard
julliard at winehq.org
Tue Nov 16 16:32:27 CST 2021
Module: wine
Branch: master
Commit: 4b678c1e9a8faf10576cede771a9c37cae5244ef
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4b678c1e9a8faf10576cede771a9c37cae5244ef
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Nov 15 16:30:19 2021 -0600
wined3d: Make the "counter_bo" field of struct wined3d_unordered_access_view a wined3d_bo pointer.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/view.c | 8 ++++----
dlls/wined3d/wined3d_private.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 79dbc847249..b902812aded 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -1616,7 +1616,7 @@ void wined3d_unordered_access_view_set_counter(struct wined3d_unordered_access_v
src.buffer_object = 0;
src.addr = (void *)&value;
- dst.buffer_object = (struct wined3d_bo *)view->counter_bo;
+ dst.buffer_object = view->counter_bo;
dst.addr = NULL;
wined3d_context_copy_bo_address(context, &dst, &src, sizeof(uint32_t));
@@ -1632,7 +1632,7 @@ void wined3d_unordered_access_view_copy_counter(struct wined3d_unordered_access_
if (!view->counter_bo)
return;
- src.buffer_object = (struct wined3d_bo *)view->counter_bo;
+ src.buffer_object = view->counter_bo;
src.addr = NULL;
wined3d_buffer_copy_bo_address(buffer, context, offset, &src, sizeof(uint32_t));
@@ -1670,7 +1670,7 @@ static void wined3d_unordered_access_view_gl_cs_init(void *object)
{
struct wined3d_bo_gl *bo = &view_gl->counter_bo;
- view_gl->v.counter_bo = (uintptr_t)bo;
+ view_gl->v.counter_bo = &bo->b;
wined3d_context_gl_create_bo(context_gl, sizeof(uint32_t), GL_ATOMIC_COUNTER_BUFFER,
GL_STATIC_DRAW, true, GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_CLIENT_STORAGE_BIT, bo);
wined3d_unordered_access_view_set_counter(&view_gl->v, 0);
@@ -2253,7 +2253,7 @@ static void wined3d_unordered_access_view_vk_cs_init(void *object)
{
TRACE("Created counter buffer view 0x%s.\n", wine_dbgstr_longlong(uav_vk->vk_counter_view));
- uav_vk->v.counter_bo = (uintptr_t)&uav_vk->counter_bo;
+ uav_vk->v.counter_bo = &uav_vk->counter_bo.b;
}
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 826bdc6e4a9..90824d83290 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -5320,7 +5320,7 @@ struct wined3d_unordered_access_view
const struct wined3d_format *format;
struct wined3d_view_desc desc;
- uintptr_t counter_bo;
+ struct wined3d_bo *counter_bo;
};
void wined3d_unordered_access_view_cleanup(struct wined3d_unordered_access_view *view) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list