On Mon Mar 23 14:01:16 2026 +0000, Rémi Bernon wrote:
Fwiw I'm still reviewing the code, but I'm not completely sure to see how this context makes things simpler. It seems to me that it duplicates information that is already available otherwise. For instance up_node_type is already available from `IMFTopologyNode_GetNodeType(branch->up.node, &context->up_node_type)`, same thing for `up_types.index0`. It also adds an extra layer of indirection with more state to keep in mind when reading each function. If we want to simplify some logic we could use extra helpers, but adding one stateful context makes it more difficult to understand the logic dependency between the various connection steps. For instance, whether down node type enumeration is dependent on up node type enumeration or not, becomes a bit blurry when they are kept together in this new context. We can probably do without the context, but it will be very useful to have a stateful enumerator later. Where both up and down nodes are enumerated for connection, the current type is a complication, and we end up with multiple possibilities:
current up + current down current up + enumerated down enumerated up + current down enumerated up + enumerated down An enumerator which handles this internally allows us to use a nested loop where the connection logic appears once. That's not apparent in this MR though. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10009#note_133502