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, "...");
http://bugs.winehq.org/show_bug.cgi?id=20811
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|testcases |-unknown
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2009-11-24 02:35:44 --- If this is under Wine and the test works fine under Windows then the problem is not in the test.
http://bugs.winehq.org/show_bug.cgi?id=20811
--- Comment #2 from chris ahrendt celticht32@aol.com 2009-11-24 06:41:23 --- was told it does the same on both platforms... I see this on Wine... it was discussed and is a easy fix as I put below...
chris
http://bugs.winehq.org/show_bug.cgi?id=20811
--- Comment #3 from Ken Phillis Jr kphillisjr@gmail.com 2010-08-08 13:36:51 --- Created an attachment (id=30056) --> (http://bugs.winehq.org/attachment.cgi?id=30056) D3D9 Query test from v1.3.0
I just tested against wine 1.3.0 latest git... this bug still exists upstream.
http://bugs.winehq.org/show_bug.cgi?id=20811
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr 2011-07-09 09:07:30 CDT --- still a bug in current wine?
http://bugs.winehq.org/show_bug.cgi?id=20811
--- Comment #5 from Austin English austinenglish@gmail.com 2013-11-13 16:49:34 CST --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=20811
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |ABANDONED
--- Comment #6 from Austin English austinenglish@gmail.com --- Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=20811
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Austin English austinenglish@gmail.com --- Closing.