-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Am 2016-07-10 um 23:14 schrieb Aaryaman Vasishta:
> Anyways, the vtable qi tests tests written so far show that
> querying IDirect3DRMObject from a particular interface will return
> version 1 of that interface. So technically it all comes down to
> calling
> IDirect3DRM<Interface_name>::AddDestroyCallback(&object->version1_vtable,
> ...);. In our implementation of this method (see d3drm_main.c), we
> have passed version 1 of the relevant interface while calling the
> destroy callbacks within d3drm_object_destroy. The tests seem to
> agree with that implementation so far.
Well, but you can call AddDestroyCallback on the version 3 interface too:
IDirect3DRMDevice *dev1;
IDirect3DRMDevice3 *dev3;
dev1 = create_device();
dev3 = dev1->qi(IID_IDirect3DRMDevice3);
dev1->AddDestroyCallback(...);
dev3->AddDestroyCallback(...);
The current code will always pass dev1 to the callback. It may be
correct, it may be wrong.