http://bugs.winehq.org/show_bug.cgi?id=20811
Summary: query.c:224 Test Failed: IDirect3DQuery9_GetData a 2nd time on a ended query returned 00000001 Product: Wine Version: 1.1.33 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: testcases AssignedTo: wine-bugs@winehq.org ReportedBy: celticht32@aol.com
Looking at the wine test results for the following test:
query.c in the d3d9 tests directory...
hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); ok(hr == S_OK, "IDirect3DQuery9_GetData on a ended query returned %08x\n", hr);
hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); ok(hr == S_OK, "IDirect3DQuery9_GetData a 2nd time on a ended query returned %08x\n", hr);
the MSDK says the following :
IDirect3DQuery9::GetData
Polls a queried resource to get the query state or a query result. For more information about queries, see Queries (Direct3D 9).
Return Values
The return type identifies the query state (see Queries (Direct3D 9)). The method returns S_OK if the query data is available and S_FALSE if it is not. These are considered successful return values. If the method fails when D3DGETDATA_FLUSH is used, the return value can be D3DERR_DEVICELOST.
The test fails with :
query.c:224: Test failed: IDirect3DQuery9_GetData a 2nd time on a ended query returned 00000001
which is a S_FALSE (1) which just means the data is not available... which according to the MSDN site is an ok value to return... and is a success.
Also reading the MSDN the D3DGETDATA_FLUSH is supposed to flush the query so the value its returning is ok...
So If I am understanding the above code the first one should return a S_OK saying that it flushed the query code.... Then the second call should return a S_FALSE because the query has nothing in it.....
Stephan said in Dev list :
I guess its fine to accept this result then. I think the original motivation behind these tests was that HL2 called GetData() more than once and this raised GL errors - the query code now filters such calls out to prevent calling bad GL calls. My guess is that its ok to modify the test to accept both results. Ie, ok(hr == S_OK | hr == S_FALSE, "...");