From 35351125981bf597e3c14e13b59eaac7e1701146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 31 Aug 2017 09:29:02 +0200 Subject: [PATCH] tests: Check that PS was invoked at least once for each pixel. --- tests/d3d12.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 8dc806be..001a47c3 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -11387,8 +11387,8 @@ static void test_query_pipeline_statistics(void) ID3D12QueryHeap *query_heap; ID3D12Resource *resource; struct resource_readback rb; + unsigned int pixel_count, i; HRESULT hr; - int i; if (!init_test_context(&context, NULL)) return; @@ -11458,8 +11458,9 @@ static void test_query_pipeline_statistics(void) pipeline_statistics->CPrimitives); /* Exact number of pixel shader invocations depends on the graphics card. */ - ok(pipeline_statistics->PSInvocations > 0, "PSInvocations: Got %"PRIu64", expected > 0.\n", - pipeline_statistics->PSInvocations); + pixel_count = context.render_target_desc.Width * context.render_target_desc.Height; + ok(pipeline_statistics->PSInvocations >= pixel_count, "PSInvocations: Got %"PRIu64", expected >= %u.\n", + pipeline_statistics->PSInvocations, pixel_count); /* We used no tessellation or compute shaders at all. */ ok(pipeline_statistics->HSInvocations == 0, "HSInvocations: Got %"PRIu64", expected 0.\n",