Components: Vulkan
VK-GL-CTS Issue: 2122
Affected tests:
dEQP-VK.graphicsfuzz.continue-and-merge
dEQP-VK.graphicsfuzz.control-flow-switch
dEQP-VK.graphicsfuzz.discard-continue-return
dEQP-VK.graphicsfuzz.fragcoord-control-flow-2
dEQP-VK.graphicsfuzz.fragcoord-control-flow
dEQP-VK.graphicsfuzz.loop-call-discard
dEQP-VK.graphicsfuzz.mat-array-deep-control-flow
dEQP-VK.graphicsfuzz.mat-array-distance
dEQP-VK.graphicsfuzz.return-in-loop-in-function
dEQP-VK.graphicsfuzz.unreachable-continue-statement
Change-Id: Iaa7448ee4a815d9e3a1c8a5582214ecd599ac143
(cherry picked from commit
46bcbf639d7bd79f630587fdc951dfa2ee8507af)
%42 = OpLabel
OpLoopMerge %47 %45 None
OpBranchConditional %false %49 %47
- %49 = OpLabel
- OpLoopMerge %45 %52 None
- OpBranchConditional %false %45 %45
- %52 = OpLabel
- OpBranch %49
- %45 = OpLabel
- OpBranch %42
+ %49 = OpLabel
+ OpLoopMerge %50 %52 None
+ OpBranchConditional %false %50 %50
+ %52 = OpLabel
+ OpBranch %49
+ %50 = OpLabel
+ OpBranch %45
+ %45 = OpLabel
+ OpBranch %42
%47 = OpLabel
OpStore %_GLF_color %red
OpReturn
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 195
+; Bound: 196
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpBranchConditional %150 %151 %146
%151 = OpLabel
%154 = OpConvertFToS %int %124
- OpSelectionMerge %156 None
+ OpSelectionMerge %195 None
OpSwitch %154 %156 9 %157 42 %158
+ %195 = OpLabel
+ OpBranch %156
%156 = OpLabel
- %194 = OpPhi %bool %179 %151 %178 %166
+ %194 = OpPhi %bool %179 %151 %178 %166 %false %195
%169 = OpIAdd %int %177 %int_1
OpBranch %145
%157 = OpLabel
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 96
+; Bound: 98
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
%32 = OpLoad %float %31
%33 = OpConvertFToS %int %32
%35 = OpSLessThan %bool %33 %int_10000000
- OpSelectionMerge %37 None
+ OpSelectionMerge %96 None
OpBranchConditional %35 %36 %38
%36 = OpLabel
OpBranch %37
%54 = OpLabel
%89 = OpPhi %int %int_0 %47 %62 %55
%60 = OpSLessThan %bool %89 %int_1
- OpLoopMerge %56 %55 None
- OpBranchConditional %60 %55 %56
+ OpLoopMerge %97 %55 None
+ OpBranchConditional %60 %55 %97
%55 = OpLabel
OpStore %_GLF_color %12
%62 = OpIAdd %int %89 %int_1
OpBranch %54
+ %97 = OpLabel
+ OpBranch %56
%56 = OpLabel
%64 = OpIAdd %int %83 %int_1
OpBranch %46
OpKill
%44 = OpLabel
OpBranch %37
+ %96 = OpLabel
+ OpBranch %37
%37 = OpLabel
- %95 = OpPhi %v4float %87 %36 %85 %44
+ %95 = OpPhi %v4float %87 %36 %85 %44 %88 %96
%81 = OpIAdd %int %82 %int_1
OpBranch %17
%19 = OpLabel
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 201
+; Bound: 206
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpBranch %19
%35 = OpLabel
%39 = OpFOrdLessThan %bool %32 %float_0
- OpSelectionMerge %41 None
+ OpSelectionMerge %201 None
OpBranchConditional %39 %40 %41
%40 = OpLabel
OpBranch %19
+ %201 = OpLabel
+ OpBranch %41
%41 = OpLabel
%44 = OpIAdd %int %167 %int_1
OpBranch %17
%49 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
%50 = OpLoad %float %49
%52 = OpFOrdLessThan %bool %50 %float_40
- OpSelectionMerge %53 None
+ OpSelectionMerge %202 None
OpBranchConditional %52 %53 %55
+ %202 = OpLabel
+ OpBranch %53
%53 = OpLabel
OpStore %_GLF_color %12
OpBranchConditional %false %45 %47
OpBranchConditional %70 %65 %66
%65 = OpLabel
%74 = OpFOrdLessThan %bool %50 %float_160
- OpSelectionMerge %76 None
+ OpSelectionMerge %203 None
OpBranchConditional %74 %75 %94
%75 = OpLabel
OpBranch %78
%86 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%87 = OpLoad %float %86
%88 = OpFOrdLessThan %bool %87 %float_0
- OpSelectionMerge %90 None
+ OpSelectionMerge %204 None
OpBranchConditional %88 %89 %91
%89 = OpLabel
OpBranch %90
%91 = OpLabel
OpStore %_GLF_color %12
OpBranch %90
+ %204 = OpLabel
+ OpBranch %90
%90 = OpLabel
%93 = OpISub %int %185 %int_1
OpBranch %78
%126 = OpLabel
%182 = OpPhi %int %int_0 %119 %134 %127
%132 = OpSLessThan %bool %182 %int_1
- OpLoopMerge %128 %127 None
- OpBranchConditional %132 %127 %128
+ OpLoopMerge %205 %127 None
+ OpBranchConditional %132 %127 %205
%127 = OpLabel
OpStore %_GLF_color %12
%134 = OpIAdd %int %182 %int_1
OpBranch %126
+ %205 = OpLabel
+ OpBranch %128
%128 = OpLabel
%136 = OpIAdd %int %172 %int_1
OpBranch %118
%100 = OpLabel
%200 = OpPhi %v4float %176 %104 %174 %116
OpBranch %76
+ %203 = OpLabel
+ OpBranch %76
%76 = OpLabel
- %197 = OpPhi %v4float %176 %80 %200 %100
+ %197 = OpPhi %v4float %176 %80 %200 %100 %181 %203
%153 = OpISub %int %171 %int_1
OpBranch %64
%66 = OpLabel
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 104
+; Bound: 106
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
%60 = OpLabel
%99 = OpPhi %int %int_0 %52 %88 %86
%66 = OpSLessThan %bool %99 %int_4
- OpLoopMerge %62 %86 None
- OpBranchConditional %66 %61 %62
+ OpLoopMerge %104 %86 None
+ OpBranchConditional %66 %61 %104
%61 = OpLabel
%74 = OpSelect %int %66 %int_1 %int_0
%78 = OpAccessChain %_ptr_Function_float %m %74 %98 %uint_3
%81 = OpFDiv %v2float %70 %80
%83 = OpExtInst %float %1 Distance %70 %81
%84 = OpFOrdLessThan %bool %83 %float_1
- OpSelectionMerge %86 None
+ OpSelectionMerge %105 None
OpBranchConditional %84 %85 %86
%85 = OpLabel
OpStore %_GLF_color %36
OpBranch %86
+ %105 = OpLabel
+ OpBranch %86
%86 = OpLabel
%88 = OpIAdd %int %99 %int_1
OpBranch %60
+ %104 = OpLabel
+ OpBranch %62
%62 = OpLabel
%90 = OpIAdd %int %98 %int_1
OpBranch %51
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 98
+; Bound: 100
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
%97 = OpPhi %int %int_0 %42 %66 %81
%96 = OpPhi %int %int_0 %42 %84 %81
%57 = OpSLessThan %bool %96 %int_4
- OpLoopMerge %53 %81 None
- OpBranchConditional %57 %52 %53
+ OpLoopMerge %98 %81 None
+ OpBranchConditional %57 %52 %98
%52 = OpLabel
%60 = OpSGreaterThanEqual %bool %97 %int_2
OpSelectionMerge %62 None
OpBranchConditional %60 %61 %62
%61 = OpLabel
- OpBranch %53
+ OpBranch %98
%62 = OpLabel
%66 = OpIAdd %int %97 %int_1
%73 = OpAccessChain %_ptr_Function_v4float %m %96 %95
%75 = OpVectorShuffle %v2float %74 %74 0 1
%78 = OpExtInst %float %1 Distance %76 %75
%79 = OpFOrdLessThan %bool %78 %float_1
- OpSelectionMerge %81 None
+ OpSelectionMerge %99 None
OpBranchConditional %79 %80 %81
%80 = OpLabel
OpStore %_GLF_color %82
OpBranch %81
+ %99 = OpLabel
+ OpBranch %81
%81 = OpLabel
%84 = OpIAdd %int %96 %int_1
OpBranch %51
+ %98 = OpLabel
+ OpBranch %53
%53 = OpLabel
%86 = OpIAdd %int %95 %int_1
OpBranch %41
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
%23 = OpLoad %10 %12
%24 = OpConvertSToF %6 %23
%26 = OpFOrdGreaterThanEqual %21 %24 %25
- OpSelectionMerge %28 None
+ OpSelectionMerge %58 None
OpBranchConditional %26 %27 %28
%27 = OpLabel
OpReturnValue %25
+ %58 = OpLabel
+ OpBranch %28
%28 = OpLabel
%30 = OpLoad %10 %12
%31 = OpIAdd %10 %30 %13