Made glsl loop tests a bit more robust
authorJari Komppa <jari.komppa@siru.fi>
Thu, 17 May 2018 10:27:30 +0000 (13:27 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 25 May 2018 11:32:02 +0000 (07:32 -0400)
commit7e55e5bd60ed3002a64edd1a7b6fc8299d3e496f
tree593da3b863f62c53d2101ff4461fae714f5a90ba
parent44aaa71d17fd0851ceae09e71657c33eeebbbfb2
Made glsl loop tests a bit more robust

The way the loop test suite checks for a correct result depends on
rotating the input vector's components, giving only 4 possible results.
In other words, a subtly failing implementation still had a 1 in 4
chance of passing the test.

This change increments the vector on each iteration and then decrements
the vector after the loop by the number of expected loop iterations. The
correctness test remains unchanged, but if the number of iterations does
not match the expected, the resulting vector will have a wrong value.

Also added tests where loops are within different control flow blocks,
and tests that contain a do..while block which should never loop unless
the loop variable is off by one.

Affects:

dEQP-VK.glsl.loops.*

New tests:

dEQP-VK.glsl.loops.special.*.pre_fallthrough_vertex
dEQP-VK.glsl.loops.special.*.pre_fallthrough_fragment
dEQP-VK.glsl.loops.special.*.post_fallthrough_vertex
dEQP-VK.glsl.loops.special.*.post_fallthrough_fragment
dEQP-VK.glsl.loops.special.*.dowhile_trap_vertex
dEQP-VK.glsl.loops.special.*.dowhile_trap_fragment
dEQP-VK.glsl.loops.special.*.ifblock_vertex
dEQP-VK.glsl.loops.special.*.ifblock_fragment
dEQP-VK.glsl.loops.special.*.elseblock_vertex
dEQP-VK.glsl.loops.special.*.elseblock_fragment

Components: Vulkan

VK-GL-CTS issue: 1166

Change-Id: I266537d6b5816a9e574b5b99061a4413d6493f41
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderLoopTests.cpp
external/vulkancts/mustpass/1.1.2/vk-default-no-waivers.txt
external/vulkancts/mustpass/1.1.2/vk-default.txt