[PATCH 2/3] d3drm/tests: Add test for IDirect3DRM*::CreateDeviceFromSurface (try 6).
Stefan Dösinger
stefandoesinger at gmail.com
Thu Jun 25 16:02:04 CDT 2015
Hi,
> + ok((desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER) == DDSCAPS_ZBUFFER, "Expected caps containing %x, got %x.\n", DDSCAPS_ZBUFFER, desc.ddsCaps.dwCaps);
Style-only issue: You're just checking one flag here, so ok(dwCaps & ZBUFFER, "..."); is enough
> + IDirectDrawSurface_Release(surface);
> +
> + memset(&desc, 0, sizeof(desc));
> + desc.dwSize = sizeof(desc);
> + desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
> + desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
> + desc.dwWidth = rc.right;
> + desc.dwHeight = rc.bottom;
> +
> + hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL);
> + ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
Minor issue: I don't think there's a reason to destroy and recreate the surface.
> + IDirectDrawSurface_Release(d3drm_ds);
> + IDirectDrawSurface_Release(d3drm_surface);
> + IDirectDrawSurface_Release(ds);
What happens to the depth buffer here? Does it remain attached?
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150625/a018554f/attachment.sig>
More information about the wine-devel
mailing list