On 14 April 2014 22:51, Matteo Bruni mbruni@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.