mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:37:09 +00:00
d3d11/tests: Use a pixel shader that consumes SV_Position in test_pipeline_statistics_query().
Some drivers (AMD Radeon RX 6700 XT, with radeonsi from Mesa 22.2.0-rc3) emit less than one invocation per pixel, presumably because they detect that the shader control flow is uniform for all pixels. Having the control flow depend on SV_Position avoids this test failure. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
This commit is contained in:
parent
34bd0dd070
commit
d89a017056
|
@ -6027,7 +6027,6 @@ static void test_occlusion_query(void)
|
|||
static void test_pipeline_statistics_query(void)
|
||||
{
|
||||
static const D3D11_QUERY_DATA_PIPELINE_STATISTICS zero_data = {0};
|
||||
static const struct vec4 red = {1.0f, 0.0f, 0.0f, 1.0f};
|
||||
static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
||||
D3D11_QUERY_DATA_PIPELINE_STATISTICS data;
|
||||
|
@ -6036,9 +6035,27 @@ static void test_pipeline_statistics_query(void)
|
|||
D3D11_QUERY_DESC query_desc;
|
||||
ID3D11Asynchronous *query;
|
||||
unsigned int data_size;
|
||||
ID3D11PixelShader *ps;
|
||||
ID3D11Device *device;
|
||||
HRESULT hr;
|
||||
|
||||
static const DWORD ps_code[] =
|
||||
{
|
||||
#if 0
|
||||
float4 main(float4 pos : sv_position) : sv_target
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
#endif
|
||||
0x43425844, 0xac408178, 0x2ca4213f, 0x4f2551e1, 0x1626b422, 0x00000001, 0x000000d8, 0x00000003,
|
||||
0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
|
||||
0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000f0f, 0x705f7673, 0x7469736f, 0x006e6f69,
|
||||
0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
|
||||
0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074, 0x52444853, 0x0000003c, 0x00000040,
|
||||
0x0000000f, 0x04002064, 0x001010f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000,
|
||||
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e,
|
||||
};
|
||||
|
||||
if (!init_test_context(&test_context, NULL))
|
||||
return;
|
||||
|
||||
|
@ -6098,8 +6115,12 @@ static void test_pipeline_statistics_query(void)
|
|||
ok(!data.CSInvocations, "Got unexpected CSInvocations count: %u.\n", (unsigned int)data.CSInvocations);
|
||||
}
|
||||
|
||||
hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||
|
||||
ID3D11DeviceContext_Begin(context, query);
|
||||
draw_color_quad(&test_context, &red);
|
||||
draw_quad(&test_context);
|
||||
ID3D11DeviceContext_End(context, query);
|
||||
get_query_data(context, query, &data, sizeof(data));
|
||||
ok(data.IAVertices == 4, "Got unexpected IAVertices count: %u.\n", (unsigned int)data.IAVertices);
|
||||
|
@ -6114,6 +6135,7 @@ static void test_pipeline_statistics_query(void)
|
|||
ok(!data.DSInvocations, "Got unexpected DSInvocations count: %u.\n", (unsigned int)data.DSInvocations);
|
||||
ok(!data.CSInvocations, "Got unexpected CSInvocations count: %u.\n", (unsigned int)data.CSInvocations);
|
||||
|
||||
ID3D11PixelShader_Release(ps);
|
||||
ID3D11Asynchronous_Release(query);
|
||||
release_test_context(&test_context);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue