[PATCH 1/5] d3d9/tests: Add a test for timestamp queries. (try 2)

Henri Verbeet hverbeet at gmail.com
Tue Apr 15 07:10:54 CDT 2014


On 14 April 2014 22:51, Matteo Bruni <mbruni at codeweavers.com> wrote:
> +    hr = IDirect3DDevice9_CreateQuery(device, D3DQUERYTYPE_TIMESTAMPDISJOINT, &disjoint_query);
> +    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr);
> +    data_size = IDirect3DQuery9_GetDataSize(disjoint_query);
...
> +    hr = IDirect3DDevice9_CreateQuery(device, D3DQUERYTYPE_TIMESTAMP, &query);
> +    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr);
> +    data_size = IDirect3DQuery9_GetDataSize(query);
I don't think this really works. Either creating these queries can
legitimately fail and you need to handle those failures, or
TIMESTAMPDISJOINT and TIMESTAMP are always supported if TIMESTAMPFREQ
is, and D3DERR_NOTAVAILABLE is not a legitimate return value.



More information about the wine-devel mailing list