CreateDeviceFromD3D implementations, device QI tests and some other patches.

Aaryaman Vasishta jem456.vasishta at gmail.com
Wed Aug 19 07:11:41 CDT 2015


Made all the changes pointed in your mail. Attached are the modified
patches.
I've used SUCCEEDED(hr) instead of D3DRM_OK as it's independent of the
current API being used, since all their values are the same.


Cheers,
Jam

On Wed, Aug 19, 2015 at 2:02 PM, Stefan Dösinger <stefandoesinger at gmail.com>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> In patch 1 you have an if condition you can remove now:
>
> > -    todo_wine ok(hr == D3DRM_OK, "Cannot get IDirect3DDevice interface
> (hr = %x).\n", hr);
> > +    ok(hr == D3DRM_OK, "Cannot get IDirect3DDevice interface (hr =
> %x).\n", hr);
> >      if (FAILED(hr))
> >          goto cleanup;
> The same applies to the equivalent places in patch 2.
>
> After patch 2 I think the if (device->device) check in
> d3drm_device3_GetDirect3DDevice is no longer needed, and similarly in
> GetDirect3DDevice2.
>
> In patch 2 you're still more or less thunking back to device 1 in
> d3drm3_CreateDeviceFromD3D because d3drm_device_set_ddraw_device_d3d. This
> is OK if you prefer it that way, but the code might look nicer if you make
> d3drm2_CreateDeviceFromD3D and d3drm3_CreateDeviceFromD3D QI the older
> interfaces and then call IDirect3DRM_CreateDeviceFromD3D.
>
> Patch 3:
> > +    hr = IDirect3DRMDevice_QueryInterface(device1,
> &IID_IDirect3DRMDevice2, (void **)&device2);
> > +    ok(hr == DD_OK, "Cannot get IDirect3DRMDevice2 Interface (hr =
> %x).\n", hr);
> Minor matter of taste thing: S_OK or D3DRM_OK
>
> > +    hr = IDirect3DRMDevice2_GetDirect3DDevice2(device2, &d3ddevice2);
> > +    ok(hr == DD_OK, "Expected hr == DD_OK, got %x).\n", hr);
> D3DRM_OK. You're calling a d3drm object here. I won't block these patches
> based on that, S_OK, D3DRM_OK, D3D_OK and DD_OK are all the same value...
>
> Patches 4, 5 and 6 look OK.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBAgAGBQJV1D8jAAoJEN0/YqbEcdMwkpAP/288xtKa+gj88tVt/rzxgFjg
> vRwDuusTrNjhRGE7mVuGKkRXmyBwSnM4QC4giJRDoLxYjNkzOFCFJK8lgExrU3G3
> 1ODD1CnayL2XUcxpNPwUu4IrLYR0oUkxnC9iDEteR9mWLmdXzeHNM9J+XRzkmLT2
> maJrwRVYnk/funOqscGwkVbt3Y62qyRI1/G8+4NFuPPfpcW2L14PI91mAkiCrS80
> afLyDhT9PzX6I4Mb686iia+aP5ktxm3pBtnZmTfra1PAPl9bXjVPEb24Iyj3DgkE
> fZfnUYtPj3GEgWlCWko3RwNkjMUBolSGsc9nEgzCt0i0hr8NGFzvGppdv0umINWP
> Mx6aghmsixBT+YXkbrKRxwwZZXyMvW/HSvW8w0QO/ZHUuNurwymkTBQlyrUrgKkD
> 5615g1u8zA9yUe41yJ+SKu34uugF0mvaeDOVWaHH8IgFRYSU8aJ/JGOFFMSyjCgq
> 1R/gHoyHexAFB+e9nwoYRtYFOdpg8hhD91EVsm6LYnqWZqj3uBsGabWqoYlKBAHk
> xarpI3cYHpwMnAmjfW1gCighM7EWBvBPvlgw955NDwzOJT93GbJ4OPhSV6WBKQzv
> yjJ+uNyBhkTk2drkXcM++2j2c/kG3hClDtVHNVzmDHVq3ApkEun+l648fqLmmC8a
> aLr+xidkCe11hqlZ9veJ
> =59AI
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150819/6a00a1c3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d3drm-Implement-IDirect3DRM-CreateDeviceFromD3D.patch
Type: text/x-diff
Size: 6334 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150819/6a00a1c3/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-d3drm-Implement-IDirect3DRM-2-3-CreateDeviceFromD3D.patch
Type: text/x-diff
Size: 12280 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150819/6a00a1c3/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-d3drm-GetDirect3DDevice2-returns-D3DRM_OK-when-IDire.patch
Type: text/x-diff
Size: 3241 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150819/6a00a1c3/attachment-0005.patch>


More information about the wine-devel mailing list