Elizabeth Figura (@zfigura) commented about dlls/d3d9/device.c:
+ if (IsEqualGUID(riid, &IID_IDirect3DDevice9On12)) + { + struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + + if (!device->d3d_parent->d3d9on12) + { + WARN("IDirect3D9 instance wasn't created with D3D9On12 enabled, returning E_NOINTERFACE.\n"); + *out = NULL; + return E_NOINTERFACE; + } + + FIXME("pD3D12Device value is not being checked if it matches the d3d9 device\n"); + + device->IDirect3DDevice9On12_iface.lpVtbl = &d3d9on12_vtbl; + IDirect3DDevice9On12_QueryInterface(&device->IDirect3DDevice9On12_iface, riid, out);
And you can just directly return &device->IDirect3DDevice9On12_iface here. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4915#note_75683