d3d11: Add support for D3D11_QUERY_SO_STATISTICS_STREAM{0, 1, 2, 3} queries.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-05-24 17:10:01 +02:00 committed by Alexandre Julliard
parent 1eb642aaf2
commit 856210b621
2 changed files with 48 additions and 48 deletions

View File

@ -406,6 +406,14 @@ static HRESULT d3d_query_init(struct d3d_query *query, struct d3d_device *device
/* D3D11_QUERY_OCCLUSION_PREDICATE */ WINED3D_QUERY_TYPE_OCCLUSION,
/* D3D11_QUERY_SO_STATISTICS */ WINED3D_QUERY_TYPE_SO_STATISTICS,
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE */ WINED3D_QUERY_TYPE_SO_OVERFLOW,
/* D3D11_QUERY_SO_STATISTICS_STREAM0 */ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0,
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 */ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM0,
/* D3D11_QUERY_SO_STATISTICS_STREAM1 */ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM1,
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 */ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM1,
/* D3D11_QUERY_SO_STATISTICS_STREAM2 */ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM2,
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 */ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM2,
/* D3D11_QUERY_SO_STATISTICS_STREAM3 */ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3,
/* D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 */ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM3,
};
if (desc->Query >= ARRAY_SIZE(query_type_map))

View File

@ -4602,13 +4602,13 @@ static void test_create_query(void)
{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_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM0, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, 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},
{D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE},
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM2, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM2, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE},
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM3, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM3, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE},
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
};
@ -18665,10 +18665,8 @@ static void test_quad_tessellation(void)
ID3D11DeviceContext_SOSetTargets(context, 1, &so_buffer, &offset);
query_desc.Query = D3D11_QUERY_SO_STATISTICS_STREAM0;
query_desc.MiscFlags = 0;
query = NULL;
hr = ID3D11Device_CreateQuery(device, &query_desc, (ID3D11Query **)&query);
todo_wine ok(hr == S_OK, "Failed to create query, hr %#x.\n", hr);
if (query)
ok(hr == S_OK, "Failed to create query, hr %#x.\n", hr);
ID3D11DeviceContext_Begin(context, query);
set_quad_color(&test_context, &white);
@ -18684,8 +18682,6 @@ static void test_quad_tessellation(void)
ID3D11DeviceContext_Draw(context, 4, 0);
check_texture_color(test_context.backbuffer, 0xffffffff, 0);
if (query)
{
ID3D11DeviceContext_End(context, query);
for (i = 0; i < 500; ++i)
{
@ -18701,15 +18697,12 @@ static void test_quad_tessellation(void)
ok(so_statistics.PrimitivesStorageNeeded == 8, "Got unexpected primitives storage needed %u.\n",
(unsigned int)so_statistics.PrimitivesStorageNeeded);
ID3D11DeviceContext_Begin(context, query);
}
constant.tess_factors[0] = 5.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &constant, 0, 0);
ID3D11DeviceContext_Draw(context, 4, 0);
check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
if (query)
{
ID3D11DeviceContext_End(context, query);
for (i = 0; i < 500; ++i)
{
@ -18725,7 +18718,6 @@ static void test_quad_tessellation(void)
ok(so_statistics.PrimitivesStorageNeeded == 11, "Got unexpected primitives storage needed %u.\n",
(unsigned int)so_statistics.PrimitivesStorageNeeded);
ID3D11Asynchronous_Release(query);
}
ID3D11Buffer_Release(so_buffer);
ID3D11GeometryShader_Release(gs);