RFC : query.c d3d9 test...
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... so not sure what is being tested here? Is this a valid test? Also reading the MSDN the D3DGETDATA_FLUSH is supposed to flush the query so the value its returning may be 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..... Thoughts? Explinations??? Inpuut... <G> Chris
Am 23.11.2009 um 21:00 schrieb chris ahrendt:
The test fails with :
query.c:224: Test failed: IDirect3DQuery9_GetData a 2nd time on a ended query returned 00000001 This is Windows, right? Which GPU/driver?
My guess is that its ok to modify the test to accept both results. Ie, ok(hr == S_OK | hr == S_FALSE, "...");
On Mon, Nov 23, 2009 at 9:23 PM, Stefan Dösinger <stefandoesinger(a)gmx.at> wrote:
Am 23.11.2009 um 21:00 schrieb chris ahrendt:
The test fails with :
query.c:224: Test failed: IDirect3DQuery9_GetData a 2nd time on a ended query returned 00000001 This is Windows, right? Which GPU/driver?
My guess is that its ok to modify the test to accept both results. Ie, ok(hr == S_OK | hr == S_FALSE, "...");
I see it all the time on my Radeon 3400 on Wine. Roderick
Am 23.11.2009 um 21:31 schrieb Roderick Colenbrander:
On Mon, Nov 23, 2009 at 9:23 PM, Stefan Dösinger <stefandoesinger(a)gmx.at> wrote:
Am 23.11.2009 um 21:00 schrieb chris ahrendt:
The test fails with :
query.c:224: Test failed: IDirect3DQuery9_GetData a 2nd time on a ended query returned 00000001 This is Windows, right? Which GPU/driver?
My guess is that its ok to modify the test to accept both results. Ie, ok(hr == S_OK | hr == S_FALSE, "...");
I see it all the time on my Radeon 3400 on Wine. 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.
participants (3)
-
chris ahrendt -
Roderick Colenbrander -
Stefan Dösinger