dawn-cmake/test/vk-gl-cts
David Neto dffa60ca98 spir-writer: handle break continuing block
The continuing block can exit the loop in very constrained ways:

When a break statement is placed such that it would exit from a loop’s
§ 7.3.8 Continuing Statement, then:

   - The break statement must appear as either:
     - The only statement in the if clause of an if statement that has:
       - no else clause or an empty else clause
       - no elseif clauses
     - The only statement in the else clause of an if statement that has an
       empty if clause and no elseif clauses.
   - That if statement must appear last in the continuing clause.

By design, this allows a lossless round-trip from SPIR-V to WGSL and
back to SPIR-V.  But that requires this special case construct in WGSL
to be translated to an OpBranchConditional with one target being
the loop's megre block (which is where 'break' branches to), and the
other targets the loop header (which is the loop backedge).  That
OpBranchConditional takes the place of the normal case of an
unconditional backedge.

Avoids errors like this:
 continue construct with the continue target X is not
 post dominated by the back-edge block Y

Fixed: 1034
Change-Id: If472a179380b8d77af746a3cd8e279c8a5e56b37
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59800
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-07-27 15:12:27 +00:00
..
api/descriptor_set/descriptor_set_layout_binding/layout_binding_order Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00
binding_model/dynamic_offset Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00
combined_operations/negintdivand Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00
graphicsfuzz spir-writer: handle break continuing block 2021-07-27 15:12:27 +00:00
non_robust_buffer_access Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00
rasterization/line_continuity/line-strip intrinsics: Deprecate textureLoad() for storage textures 2021-07-26 11:46:47 +00:00
spirv_assembly/instruction spirv-reader: fix mapping of OpLogicalOr, OpLogicalAnd 2021-07-26 17:34:58 +00:00
subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00 Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00
texture Add tests derived from VK-GL-CTS 2021-07-23 13:10:12 +00:00