From: Chris Forbes Date: Mon, 16 Oct 2017 19:42:35 +0000 (-0700) Subject: Avoid watchdog timeout in Vulkan builtin precision tests X-Git-Tag: upstream/0.1.0^2^2^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2908388d66baf2df96ddbf8eb10f35c3495c8a44;p=platform%2Fupstream%2FVK-GL-CTS.git Avoid watchdog timeout in Vulkan builtin precision tests Calculating the reference intervals can take a substantial amount of time. On some very slow targets, this can cause us to trip the watchdog in the verification loop. Same approach and limit as in modules/glshared/glsBuiltinPrecisionTests.cpp Affected tests: dEQP-VK.glsl.builtin.precision.* Component: Vulkan Bug: 67854695 Test: run on google devices Change-Id: I492b656e7e2a9aa724bb3785bdf1416a4c22ec04 --- diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp index 4e406d8..a5c09c7 100644 --- a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp @@ -63,6 +63,15 @@ // set this to true to dump even passing results #define GLS_LOG_ALL_RESULTS false +enum +{ + // Computing reference intervals can take a non-trivial amount of time, especially on + // platforms where toggling floating-point rounding mode is slow (emulated arm on x86). + // As a workaround watchdog is kept happy by touching it periodically during reference + // interval computation. + TOUCH_WATCHDOG_VALUE_FREQUENCY = 4096 +}; + namespace vkt { namespace shaderexecutor @@ -4489,6 +4498,9 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance::iterate (void) typename Traits::IVal reference0; typename Traits::IVal reference1; + if (valueNdx % (size_t)TOUCH_WATCHDOG_VALUE_FREQUENCY == 0) + m_context.getTestContext().touchWatchdog(); + env.lookup(*m_variables.in0) = convert(fmt, round(fmt, inputs.in0[valueNdx])); env.lookup(*m_variables.in1) = convert(fmt, round(fmt, inputs.in1[valueNdx])); env.lookup(*m_variables.in2) = convert(fmt, round(fmt, inputs.in2[valueNdx]));