On Sun, 7 Mar 2021 at 23:19, Zebediah Figura z.figura12@gmail.com wrote:
@@ -2058,6 +2082,7 @@ struct wined3d_device_context * CDECL wined3d_device_get_immediate_context(struc { TRACE("device %p.\n", device);
- wined3d_device_context_incref(&device->cs->c); return &device->cs->c;
}
That's inconsistent with the rest of the API. As a rule we don't increment reference counts when returning objects, leaving that to the caller instead if necessary. (And more often than not, it isn't.)
It may also be worth mentioning why device contexts need to be reference counted at all. I assume there's a reason, but it's not obvious to me from this series.