[PATCH 2/3] d3drm/tests: Add tests for IDirect3DRM*::CreateViewport.

Stefan Dösinger stefandoesinger at gmail.com
Sun Jun 5 17:11:16 CDT 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 2016-06-05 um 19:28 schrieb Aaryaman Vasishta:
> +    hr = IDirect3DRM_CreateViewport(d3drm1, device1, frame, 0, 0, 0, 0, &viewport);
> +    ok(SUCCEEDED(hr), "Cannot get IDirect3DRMViewport interface (hr = %x)\n", hr);
> +    ref4 = get_refcount((IUnknown *)d3drm1);
> +    todo_wine ok(ref4 > ref1, "Expected ref4 > ref1, got ref1 = %u, ref4 = %u.\n", ref1, ref4);
> +    ref4 = get_refcount((IUnknown *)d3drm2);
> +    ok(ref4 == ref2, "Expected ref4 == ref2, got ref2 = %u, ref4 = %u.\n", ref2, ref4);
> +    ref4 = get_refcount((IUnknown *)d3drm3);
> +    ok(ref4 == ref3, "Expected ref4 == ref3, got ref3 = %u, ref4 = %u.\n", ref3, ref4);
Does creating the viewport have any influence of the device's or the frame's refcount?

> +    hr = IDirect3DRM_CreateViewport(d3drm1, device1, frame, -1, 0, 0, 0, &viewport);
> +    todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr);
x, y, width and height are DWORDs. -1 only makes limited sense here. It is probably better to test width and height = 0 and test x and (x + width) against the device's render target size. (smaller, matching, larger. Also obviously the same with y + height).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXVKOEAAoJEN0/YqbEcdMwKvsP/jzDXf0eCqtCjXtfEiOlknWL
iaBRAFHJnFz7fhFX1yZDX63HScoksoWw3TAby6LDX8zA0oVMWP7IYLXk+lx4xPTg
mj8+lhvyPNPDl+PQ4feU/1sAwByBVR9qn6kwxgF6nsW0RXqalCeztcMxLOkC5kXZ
bGbt/t4ZaCNVyZLjv5tYOcUHq+MP9Q8cKnbq3cGaivsd/cab4ORfpFccstBqLlL+
LJD65/oCtq9A+OGORVxuin7CFszSP9OR3/vFiCDMvJFjIFMWSss4gTxF4vvamD9+
Fie3E85DBWr3fBomKlKEPeky7LW0QBv5NcdzJhLaXiaCkxgKd5s54v70+2C4OSEE
/N1P5v4vCjfJ8ZhFKyXJmTa6NPO0qXTnGY+HREmhva/aemTG706DaS58mWacovr1
+xx5uvMcuG2dQUGqDjp3KVKz+wLnPovfn3WoEtQ82Tvgq3g2aJbsEKHhFUjkscpG
l/Ck0NcZMnQA7OxREO8+D2R7rSI+WdLyKHTrPmWc8HJ/5EWL2LE2YkdwNvjzpbTI
7fWHd5PE1NFdw7xzcHajq62485fZe1T+vt1qkMO70qjRkvlGgW/OI1VzVr7GyhSp
UBxXTHrb32rQn3UD36SAYiGh6pF5HAszSAUVeesUx0VEAsP/CazZS0HHOP5fksrc
MmZ1+t0cL04S8q0bGxLc
=9s0i
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list