error: line 34: block <ID> 21[%21] exits the selection headed by <ID> 11[%11], but not via a structured exit
%21 = OpLabel
error: line 0: Validation failed after pass merge-blocks
I manually checked the SPIR-V. I believe there is a branch to a continue target that also illegally exits a selection.
bug_report.zip
spiv-opt produces invalid SPIR-V. Output:
I manually checked the SPIR-V. I believe there is a branch to a continue target that also illegally exits a selection.
Tool versions:
To reproduce:
glslangValidator -V shader.frag -o shader.frag.spv
spirv-opt shader.frag.spv -o temp.spv --validate-after-all --reduce-load-size --scalar-replacement=100 --simplify-instructions --redundancy-elimination --merge-blocks
The following shader files are included in the attached archive:
Issue found using GraphicsFuzz.