From 6e0e2bef5db0c65515893ad2430317cda7eb16e3 Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Tue, 25 Jan 2022 11:51:39 +0100 Subject: [PATCH] wined3d: Acquire references to vertex 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 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 224a52324b8..b268ce83ca0 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3671,6 +3671,19 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac break; } + case WINED3D_CS_OP_SET_STREAM_SOURCES: + { + struct wined3d_cs_set_stream_sources *op; + + op = (struct wined3d_cs_set_stream_sources *)packet->data; + for (i = 0; i < op->count; ++i) + { + if (op->streams[i].buffer) + wined3d_buffer_decref(op->streams[i].buffer); + } + break; + } + default: break; } @@ -3860,6 +3873,19 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet) break; } + case WINED3D_CS_OP_SET_STREAM_SOURCES: + { + struct wined3d_cs_set_stream_sources *op; + + op = (struct wined3d_cs_set_stream_sources *)packet->data; + for (i = 0; i < op->count; ++i) + { + if (op->streams[i].buffer) + wined3d_buffer_incref(op->streams[i].buffer); + } + break; + } + default: break; }