Force thread count in deferred host operations
authorRicardo Garcia <rgarcia@igalia.com>
Thu, 22 Oct 2020 07:36:48 +0000 (09:36 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 26 Nov 2020 17:36:07 +0000 (12:36 -0500)
Several ray tracing tests use deferred host operations with a non-zero number
of threads to check the implementation works as expected. Thread counts are
usually 1, 2, 3, 4, 8 or "max". "max" thread counts are not unlimited. They use
the implementation-defined concurrency limit for a given operation, capped to
at most 256 threads.

In other cases, the implementation-defined concurrency limit for a given
operation was checked to be at least as big as the number of target threads for
the test. Otherwise, the test performed a late-exit with a "not supported"
result, which is unusual.

Tests with 1 thread were always supposed to run because the implementation can
only return zero when the operation has already completed.

Tests with the "max" limit would always run as described above.

This commit removes the concurrency limit check for intermediate values of
thread counts. The rationale is that, no matter if the implementation supports
that level of concurrency for a given operation or not, the spec allows us to
create any number of threads and make them join the deferred operation:

> Applications can join any number of threads to the deferred operation and
> expect it to eventually complete, though excessive joins may return
> VK_THREAD_DONE_KHR immediately, performing no useful work.

This change allows every test to always run, increases coverage and avoids the
late exit with "not supported" status.

Affected tests:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.host_threading.*
dEQP-VK.ray_query.acceleration_structures.host_threading.*
dEQP-VK.ray_tracing_pipeline.large_shader_set.cpu_ht*
dEQP-VK.ray_tracing_pipeline.build.*
dEQP-VK.ray_tracing_pipeline.pipeline_library.*

Components: Vulkan
VK-GL-CTS issue: 2585

Change-Id: I9b4fd8d06793b0916e61f9e3c2fd8f416d4735f1

external/vulkancts/framework/vulkan/vkRayTracingUtil.cpp

index 51eb913..fd84734 100644 (file)
@@ -487,9 +487,6 @@ void finishDeferredOperation (const DeviceInterface&        vk,
                if (maxThreadCountSupported == 0)
                        TCU_FAIL("vkGetDeferredOperationMaxConcurrencyKHR must not return 0");
 
-               if (testThreadCount > maxThreadCountSupported)
-                       TCU_THROW(NotSupportedError, "Requested number of threads is greater than allowed maximum");
-
                const DeferredThreadParams                              deferredThreadParams    =
                {
                        vk,                                     //  const DeviceInterface&      vk;