Add test to stress deeply nested OpPhi
authorJari Komppa <jari.komppa@siru.fi>
Fri, 8 Sep 2017 08:19:10 +0000 (11:19 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 26 Sep 2017 09:53:15 +0000 (05:53 -0400)
commitd10dd7a30335e961c968207bbec13f19b2938a21
tree8aafa9a7b37785514181c8394979dc0a4f29519b
parent90f86426a9a61ed522331046acf8405b73224422
Add test to stress deeply nested OpPhi

Added test that generates a deeply nested shader which modifies a
single variable in various points of the hierarchy.

Code generation is done by first creating a code string with
characters A, B and C. These characters represent the following:

A "if () { result++;"
B "} else {"
C "}"

By inserting ABC between the characters of the code string, we get
complex nested hierarchy. For example, AABCBC generates:
"if () { if { result++; if () { result ++; } else { } } else { }"

Note that the else-paths do not generate new values, and thus the code
generator needs to track the previous symbol for the else-paths.

The generated code is 8 levels deep and about 1600 lines long.
The test can be simplified for debugging purposes by reducing the
number of iterations when generating the code string.

Affects:

dEQP-VK.spirv_assembly.instruction.compute.opphi.nested

Components: Vulkan

Vk-GL-CTS issue: 259

Change-Id: I4c9943e2a11c8375104a16f0a78df136ff848831
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
external/vulkancts/mustpass/1.0.3/vk-default.txt