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

Aaryaman Vasishta jem456.vasishta at gmail.com
Mon Jun 6 06:37:19 CDT 2016


On Mon, Jun 6, 2016 at 3:41 AM, Stefan Dösinger <stefandoesinger at gmail.com>
wrote:

> -----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?
>
It does increase the frame's refcount by 1, but it doesn't affect the
device's refcount. I'll add tests to reflect this.


> > +    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).
>
Right, the documentation states that the call fails if the size of viewport
> than size of the physical device. I've used the window rect's right and
bottom for width and height respectively. So I could probably test for
right +1, bottom +1, which should fail. Or is there some other way you want
me to use x and y? Currently, x and y are always 0, since the window rect
is set that way.

Cheers,
Aaryaman


>
> -----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-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160606/2a0d9bf6/attachment-0001.html>


More information about the wine-devel mailing list