blob: 02c5348c88412081f42758d450fe4fd9d4e76bf1 [file] [log] [blame]
John Stilesdac139a2021-01-26 11:06:42 -05001### Compilation failed:
2
3error: SPIR-V validation error: OpEntryPoint Entry Point <id> '2[%main]'s function return type is not void.
4 OpEntryPoint Fragment %main "main" %sk_Clockwise
5
6OpCapability Shader
7%1 = OpExtInstImport "GLSL.std.450"
8OpMemoryModel Logical GLSL450
9OpEntryPoint Fragment %main "main" %sk_Clockwise
10OpExecutionMode %main OriginUpperLeft
11OpName %sk_Clockwise "sk_Clockwise"
12OpName %main "main"
13OpName %x "x"
14OpName %r "r"
15OpName %b "b"
16OpDecorate %sk_Clockwise RelaxedPrecision
17OpDecorate %sk_Clockwise BuiltIn FrontFacing
18OpDecorate %22 RelaxedPrecision
19OpDecorate %26 RelaxedPrecision
20OpDecorate %30 RelaxedPrecision
21OpDecorate %36 RelaxedPrecision
22OpDecorate %37 RelaxedPrecision
23OpDecorate %44 RelaxedPrecision
24OpDecorate %46 RelaxedPrecision
25OpDecorate %49 RelaxedPrecision
26OpDecorate %56 RelaxedPrecision
27OpDecorate %57 RelaxedPrecision
28OpDecorate %58 RelaxedPrecision
29%bool = OpTypeBool
30%_ptr_Input_bool = OpTypePointer Input %bool
31%sk_Clockwise = OpVariable %_ptr_Input_bool Input
32%float = OpTypeFloat 32
33%v4float = OpTypeVector %float 4
34%8 = OpTypeFunction %v4float
35%_ptr_Function_v4float = OpTypePointer Function %v4float
36%float_1 = OpConstant %float 1
37%13 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
38%_ptr_Function_float = OpTypePointer Function %float
39%float_n5 = OpConstant %float -5
40%float_5 = OpConstant %float 5
41%int = OpTypeInt 32 1
42%int_0 = OpConstant %int 0
43%float_0 = OpConstant %float 0
44%int_2 = OpConstant %int 2
45%int_1 = OpConstant %int 1
46%main = OpFunction %v4float None %8
47%9 = OpLabel
48%x = OpVariable %_ptr_Function_v4float Function
49%r = OpVariable %_ptr_Function_float Function
50%b = OpVariable %_ptr_Function_float Function
51OpStore %x %13
52OpStore %r %float_n5
53OpBranch %17
54%17 = OpLabel
55OpLoopMerge %21 %20 None
56OpBranch %18
57%18 = OpLabel
58%22 = OpLoad %float %r
59%24 = OpFOrdLessThan %bool %22 %float_5
60OpBranchConditional %24 %19 %21
61%19 = OpLabel
62%26 = OpLoad %float %r
63%25 = OpExtInst %float %1 FAbs %26
64%27 = OpAccessChain %_ptr_Function_float %x %int_0
65OpStore %27 %25
66%30 = OpLoad %v4float %x
67%31 = OpCompositeExtract %float %30 0
68%33 = OpFOrdEqual %bool %31 %float_0
69OpSelectionMerge %35 None
70OpBranchConditional %33 %34 %35
71%34 = OpLabel
72OpBranch %21
73%35 = OpLabel
74OpBranch %20
75%20 = OpLabel
76%36 = OpLoad %float %r
77%37 = OpFAdd %float %36 %float_1
78OpStore %r %37
79OpBranch %17
80%21 = OpLabel
81OpStore %b %float_5
82OpBranch %39
83%39 = OpLabel
84OpLoopMerge %43 %42 None
85OpBranch %40
86%40 = OpLabel
87%44 = OpLoad %float %b
88%45 = OpFOrdGreaterThanEqual %bool %44 %float_0
89OpBranchConditional %45 %41 %43
90%41 = OpLabel
91%46 = OpLoad %float %b
92%47 = OpAccessChain %_ptr_Function_float %x %int_2
93OpStore %47 %46
94%49 = OpLoad %v4float %x
95%50 = OpCompositeExtract %float %49 3
96%51 = OpFOrdEqual %bool %50 %float_1
97OpSelectionMerge %53 None
98OpBranchConditional %51 %52 %53
99%52 = OpLabel
100OpBranch %42
101%53 = OpLabel
102%54 = OpAccessChain %_ptr_Function_float %x %int_1
103OpStore %54 %float_0
104OpBranch %42
105%42 = OpLabel
106%56 = OpLoad %float %b
107%57 = OpFSub %float %56 %float_1
108OpStore %b %57
109OpBranch %39
110%43 = OpLabel
111%58 = OpLoad %v4float %x
112OpReturnValue %58
113OpFunctionEnd
114
1151 error