blob: 31e45e34f2c63bfdf411780e18ba046227ff486c [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"
John Stilesb41d5bb2021-01-26 16:28:12 -050012OpName %colorWhite "colorWhite"
John Stilesdac139a2021-01-26 11:06:42 -050013OpName %main "main"
14OpName %x "x"
15OpName %r "r"
16OpName %b "b"
17OpDecorate %sk_Clockwise RelaxedPrecision
18OpDecorate %sk_Clockwise BuiltIn FrontFacing
John Stilesb41d5bb2021-01-26 16:28:12 -050019OpDecorate %colorWhite RelaxedPrecision
20OpDecorate %colorWhite DescriptorSet 0
21OpDecorate %14 RelaxedPrecision
22OpDecorate %23 RelaxedPrecision
23OpDecorate %27 RelaxedPrecision
24OpDecorate %31 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050025OpDecorate %37 RelaxedPrecision
John Stilesb41d5bb2021-01-26 16:28:12 -050026OpDecorate %39 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050027OpDecorate %46 RelaxedPrecision
John Stilesb41d5bb2021-01-26 16:28:12 -050028OpDecorate %48 RelaxedPrecision
29OpDecorate %51 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050030OpDecorate %58 RelaxedPrecision
John Stilesb41d5bb2021-01-26 16:28:12 -050031OpDecorate %59 RelaxedPrecision
32OpDecorate %60 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050033%bool = OpTypeBool
34%_ptr_Input_bool = OpTypePointer Input %bool
35%sk_Clockwise = OpVariable %_ptr_Input_bool Input
36%float = OpTypeFloat 32
37%v4float = OpTypeVector %float 4
John Stilesb41d5bb2021-01-26 16:28:12 -050038%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
39%colorWhite = OpVariable %_ptr_Uniform_v4float Uniform
40%10 = OpTypeFunction %v4float
John Stilesdac139a2021-01-26 11:06:42 -050041%_ptr_Function_v4float = OpTypePointer Function %v4float
John Stilesdac139a2021-01-26 11:06:42 -050042%_ptr_Function_float = OpTypePointer Function %float
43%float_n5 = OpConstant %float -5
44%float_5 = OpConstant %float 5
45%int = OpTypeInt 32 1
46%int_0 = OpConstant %int 0
47%float_0 = OpConstant %float 0
John Stilesb41d5bb2021-01-26 16:28:12 -050048%float_1 = OpConstant %float 1
John Stilesdac139a2021-01-26 11:06:42 -050049%int_2 = OpConstant %int 2
50%int_1 = OpConstant %int 1
John Stilesb41d5bb2021-01-26 16:28:12 -050051%main = OpFunction %v4float None %10
52%11 = OpLabel
John Stilesdac139a2021-01-26 11:06:42 -050053%x = OpVariable %_ptr_Function_v4float Function
54%r = OpVariable %_ptr_Function_float Function
55%b = OpVariable %_ptr_Function_float Function
John Stilesb41d5bb2021-01-26 16:28:12 -050056%14 = OpLoad %v4float %colorWhite
57OpStore %x %14
John Stilesdac139a2021-01-26 11:06:42 -050058OpStore %r %float_n5
John Stilesdac139a2021-01-26 11:06:42 -050059OpBranch %18
60%18 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050061OpLoopMerge %22 %21 None
62OpBranch %19
John Stilesdac139a2021-01-26 11:06:42 -050063%19 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050064%23 = OpLoad %float %r
65%25 = OpFOrdLessThan %bool %23 %float_5
66OpBranchConditional %25 %20 %22
John Stilesdac139a2021-01-26 11:06:42 -050067%20 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050068%27 = OpLoad %float %r
69%26 = OpExtInst %float %1 FAbs %27
70%28 = OpAccessChain %_ptr_Function_float %x %int_0
71OpStore %28 %26
72%31 = OpLoad %v4float %x
73%32 = OpCompositeExtract %float %31 0
74%34 = OpFOrdEqual %bool %32 %float_0
75OpSelectionMerge %36 None
76OpBranchConditional %34 %35 %36
77%35 = OpLabel
78OpBranch %22
79%36 = OpLabel
80OpBranch %21
John Stilesdac139a2021-01-26 11:06:42 -050081%21 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050082%37 = OpLoad %float %r
83%39 = OpFAdd %float %37 %float_1
84OpStore %r %39
85OpBranch %18
86%22 = OpLabel
John Stilesdac139a2021-01-26 11:06:42 -050087OpStore %b %float_5
John Stilesb41d5bb2021-01-26 16:28:12 -050088OpBranch %41
John Stilesdac139a2021-01-26 11:06:42 -050089%41 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050090OpLoopMerge %45 %44 None
John Stilesdac139a2021-01-26 11:06:42 -050091OpBranch %42
92%42 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050093%46 = OpLoad %float %b
94%47 = OpFOrdGreaterThanEqual %bool %46 %float_0
95OpBranchConditional %47 %43 %45
John Stilesdac139a2021-01-26 11:06:42 -050096%43 = OpLabel
John Stilesb41d5bb2021-01-26 16:28:12 -050097%48 = OpLoad %float %b
98%49 = OpAccessChain %_ptr_Function_float %x %int_2
99OpStore %49 %48
100%51 = OpLoad %v4float %x
101%52 = OpCompositeExtract %float %51 3
102%53 = OpFOrdEqual %bool %52 %float_1
103OpSelectionMerge %55 None
104OpBranchConditional %53 %54 %55
105%54 = OpLabel
106OpBranch %44
107%55 = OpLabel
108%56 = OpAccessChain %_ptr_Function_float %x %int_1
109OpStore %56 %float_0
110OpBranch %44
111%44 = OpLabel
112%58 = OpLoad %float %b
113%59 = OpFSub %float %58 %float_1
114OpStore %b %59
115OpBranch %41
116%45 = OpLabel
117%60 = OpLoad %v4float %x
118OpReturnValue %60
John Stilesdac139a2021-01-26 11:06:42 -0500119OpFunctionEnd
120
1211 error