From a33ed42ffe8c33a0a8ae543244536acad0cfd025 Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Wed, 26 Jan 2022 15:43:37 +0100 Subject: [PATCH] wined3d: Acquire references to unordered-access view counter buffers for command lists by inspecting CS packets. Signed-off-by: Jan Sikorski Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 408f9e97a25..e272bef14e1 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3704,6 +3704,16 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac break; } + case WINED3D_CS_OP_COPY_UAV_COUNTER: + { + struct wined3d_cs_copy_uav_counter *op; + + op = (struct wined3d_cs_copy_uav_counter *)packet->data; + wined3d_buffer_decref(op->buffer); + wined3d_unordered_access_view_decref(op->view); + break; + } + default: break; } @@ -3926,6 +3936,16 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet) break; } + case WINED3D_CS_OP_COPY_UAV_COUNTER: + { + struct wined3d_cs_copy_uav_counter *op; + + op = (struct wined3d_cs_copy_uav_counter *)packet->data; + wined3d_buffer_incref(op->buffer); + wined3d_unordered_access_view_incref(op->view); + break; + } + default: break; }