From 3fb9a8ea51587f77ce4b3aba1fa477cae1eb6679 Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Tue, 25 Jan 2022 11:51:35 +0100 Subject: [PATCH] wined3d: Acquire references to indirect dispatch 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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 9f7421e865f..80f9a973eaa 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3630,6 +3630,15 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac break; } + case WINED3D_CS_OP_DISPATCH: + { + struct wined3d_cs_dispatch *op = (struct wined3d_cs_dispatch *)packet->data; + + if (op->parameters.indirect) + wined3d_buffer_decref(op->parameters.u.indirect.buffer); + break; + } + default: break; } @@ -3778,6 +3787,15 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet) break; } + case WINED3D_CS_OP_DISPATCH: + { + struct wined3d_cs_dispatch *op = (struct wined3d_cs_dispatch *)packet->data; + + if (op->parameters.indirect) + wined3d_buffer_incref(op->parameters.u.indirect.buffer); + break; + } + default: break; }