The WINED3D_QUERY_TYPE_SO_STATISTICS query type is just WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0, but it is supported on feature level 10.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d10core/tests/d3d10core.c | 9 +++++---- dlls/d3d11/tests/d3d11.c | 8 +++----- dlls/wined3d/query.c | 3 +++ 3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 43fa65e280ed..d4efad9d7df8 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -4377,7 +4377,7 @@ static void test_create_query(void) {D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE}, {D3D10_QUERY_PIPELINE_STATISTICS, FALSE, FALSE}, {D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE}, - {D3D10_QUERY_SO_STATISTICS, FALSE, TRUE}, + {D3D10_QUERY_SO_STATISTICS, FALSE, FALSE}, {D3D10_QUERY_SO_OVERFLOW_PREDICATE, TRUE, TRUE}, };
@@ -4813,9 +4813,7 @@ static void test_so_statistics_query(void) query_desc.Query = D3D10_QUERY_SO_STATISTICS; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)&query); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - if (FAILED(hr)) goto done; data_size = ID3D10Asynchronous_GetDataSize(query); ok(data_size == sizeof(data), "Got unexpected data size %u.\n", data_size);
@@ -4829,8 +4827,10 @@ static void test_so_statistics_query(void) ID3D10Asynchronous_Begin(query);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); + todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); + todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
draw_quad(&test_context); @@ -4839,6 +4839,7 @@ static void test_so_statistics_query(void) get_query_data(query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); + todo_wine ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded);
@@ -4848,11 +4849,11 @@ static void test_so_statistics_query(void) get_query_data(query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); + todo_wine ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded);
ID3D10Asynchronous_Release(query); -done: release_test_context(&test_context); }
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 5c6dfe000735..2f81a2c84ad1 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5292,7 +5292,7 @@ static void test_create_query(void) {D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, - {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE}, + {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, TRUE}, {D3D11_QUERY_SO_STATISTICS_STREAM0, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE}, @@ -5839,9 +5839,7 @@ static void test_so_statistics_query(void) query_desc.Query = tests[i].query; query_desc.MiscFlags = 0; hr = ID3D11Device_CreateQuery(device, &query_desc, (ID3D11Query **)&query); - todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - if (FAILED(hr)) continue; data_size = ID3D11Asynchronous_GetDataSize(query); ok(data_size == sizeof(data), "Got unexpected data size %u.\n", data_size);
@@ -5868,7 +5866,7 @@ static void test_so_statistics_query(void) get_query_data(context, query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); - todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) + todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS || query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded);
@@ -5878,7 +5876,7 @@ static void test_so_statistics_query(void) get_query_data(context, query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); - todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) + todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS || query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded);
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index c0a146940909..d4e7cf5b37ef 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -1259,6 +1259,8 @@ static HRESULT wined3d_so_statistics_query_create(struct wined3d_device *device,
if (WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0 <= type && type <= WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3) stream_idx = type - WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0; + else if (type == WINED3D_QUERY_TYPE_SO_STATISTICS) + stream_idx = 0; else return WINED3DERR_NOTAVAILABLE;
@@ -1353,6 +1355,7 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q case WINED3D_QUERY_TYPE_TIMESTAMP_FREQ: return wined3d_timestamp_disjoint_query_create(device, type, parent, parent_ops, query);
+ case WINED3D_QUERY_TYPE_SO_STATISTICS: case WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0: case WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM1: case WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM2:
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44735
Your paranoid android.
=== wvistau64_he (32 bit report) ===
d3d11: d3d11.c:5617: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5618: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5619: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5622: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5623: Test failed: Got unexpected CPrimitives count: 0.
=== debian9 (32 bit report) ===
d3d10core: Unhandled exception: page fault on read access to 0x6976656c in 32-bit code (0x7ed87458).
=== debian9 (32 bit WoW report) ===
d3d11: d3d11.c:5341: Test failed: Got unexpected hr 0x8876086a for query type 4. d3d11.c:5346: Test failed: Got unexpected hr 0x8876086a for query type 4. Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000).
=== debian9 (64 bit WoW report) ===
d3d10core: Unhandled exception: page fault on execute access to 0x00000000 in 64-bit code (0x0000000000000000).
d3d11: d3d11.c:5870: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:5880: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:17426: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0xffffffff, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:16342: Test failed: Got {-1.00787401e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01}, expected {-1.00000000e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01} at (0, 0), sub-resource 0.
Report errors: d3d10core:d3d10core crashed (c0000005)