Jan Sikorski : wined3d: Acquire references to constant buffers for command lists by inspecting CS packets.
Alexandre Julliard
julliard at winehq.org
Mon Jan 24 16:28:05 CST 2022
Module: wine
Branch: master
Commit: d5e13912b26e630ebcc2017c181afe47eabd18f7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d5e13912b26e630ebcc2017c181afe47eabd18f7
Author: Jan Sikorski <jsikorski at codeweavers.com>
Date: Mon Jan 24 13:59:00 2022 +0100
wined3d: Acquire references to constant buffers for command lists by inspecting CS packets.
Signed-off-by: Jan Sikorski <jsikorski at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/cs.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 221a79faa0c..76db5b5184e 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -3594,6 +3594,19 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac
break;
}
+ case WINED3D_CS_OP_SET_CONSTANT_BUFFERS:
+ {
+ struct wined3d_cs_set_constant_buffers *op;
+
+ op = (struct wined3d_cs_set_constant_buffers *)packet->data;
+ for (i = 0; i < op->count; ++i)
+ {
+ if (op->buffers[i].buffer)
+ wined3d_buffer_decref(op->buffers[i].buffer);
+ }
+ break;
+ }
+
default:
break;
}
@@ -3706,6 +3719,19 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet)
break;
}
+ case WINED3D_CS_OP_SET_CONSTANT_BUFFERS:
+ {
+ struct wined3d_cs_set_constant_buffers *op;
+
+ op = (struct wined3d_cs_set_constant_buffers *)packet->data;
+ for (i = 0; i < op->count; ++i)
+ {
+ if (op->buffers[i].buffer)
+ wined3d_buffer_incref(op->buffers[i].buffer);
+ }
+ break;
+ }
+
default:
break;
}
More information about the wine-cvs
mailing list