John Stiles | dac139a | 2021-01-26 11:06:42 -0500 | [diff] [blame^] | 1 | ### Compilation failed: |
| 2 | |
| 3 | error: 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 | |
| 6 | OpCapability Shader |
| 7 | %1 = OpExtInstImport "GLSL.std.450" |
| 8 | OpMemoryModel Logical GLSL450 |
| 9 | OpEntryPoint Fragment %main "main" %sk_Clockwise |
| 10 | OpExecutionMode %main OriginUpperLeft |
| 11 | OpName %sk_Clockwise "sk_Clockwise" |
| 12 | OpName %main "main" |
| 13 | OpName %x "x" |
| 14 | OpName %r "r" |
| 15 | OpName %b "b" |
| 16 | OpDecorate %sk_Clockwise RelaxedPrecision |
| 17 | OpDecorate %sk_Clockwise BuiltIn FrontFacing |
| 18 | OpDecorate %22 RelaxedPrecision |
| 19 | OpDecorate %26 RelaxedPrecision |
| 20 | OpDecorate %30 RelaxedPrecision |
| 21 | OpDecorate %36 RelaxedPrecision |
| 22 | OpDecorate %37 RelaxedPrecision |
| 23 | OpDecorate %44 RelaxedPrecision |
| 24 | OpDecorate %46 RelaxedPrecision |
| 25 | OpDecorate %49 RelaxedPrecision |
| 26 | OpDecorate %56 RelaxedPrecision |
| 27 | OpDecorate %57 RelaxedPrecision |
| 28 | OpDecorate %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 |
| 51 | OpStore %x %13 |
| 52 | OpStore %r %float_n5 |
| 53 | OpBranch %17 |
| 54 | %17 = OpLabel |
| 55 | OpLoopMerge %21 %20 None |
| 56 | OpBranch %18 |
| 57 | %18 = OpLabel |
| 58 | %22 = OpLoad %float %r |
| 59 | %24 = OpFOrdLessThan %bool %22 %float_5 |
| 60 | OpBranchConditional %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 |
| 65 | OpStore %27 %25 |
| 66 | %30 = OpLoad %v4float %x |
| 67 | %31 = OpCompositeExtract %float %30 0 |
| 68 | %33 = OpFOrdEqual %bool %31 %float_0 |
| 69 | OpSelectionMerge %35 None |
| 70 | OpBranchConditional %33 %34 %35 |
| 71 | %34 = OpLabel |
| 72 | OpBranch %21 |
| 73 | %35 = OpLabel |
| 74 | OpBranch %20 |
| 75 | %20 = OpLabel |
| 76 | %36 = OpLoad %float %r |
| 77 | %37 = OpFAdd %float %36 %float_1 |
| 78 | OpStore %r %37 |
| 79 | OpBranch %17 |
| 80 | %21 = OpLabel |
| 81 | OpStore %b %float_5 |
| 82 | OpBranch %39 |
| 83 | %39 = OpLabel |
| 84 | OpLoopMerge %43 %42 None |
| 85 | OpBranch %40 |
| 86 | %40 = OpLabel |
| 87 | %44 = OpLoad %float %b |
| 88 | %45 = OpFOrdGreaterThanEqual %bool %44 %float_0 |
| 89 | OpBranchConditional %45 %41 %43 |
| 90 | %41 = OpLabel |
| 91 | %46 = OpLoad %float %b |
| 92 | %47 = OpAccessChain %_ptr_Function_float %x %int_2 |
| 93 | OpStore %47 %46 |
| 94 | %49 = OpLoad %v4float %x |
| 95 | %50 = OpCompositeExtract %float %49 3 |
| 96 | %51 = OpFOrdEqual %bool %50 %float_1 |
| 97 | OpSelectionMerge %53 None |
| 98 | OpBranchConditional %51 %52 %53 |
| 99 | %52 = OpLabel |
| 100 | OpBranch %42 |
| 101 | %53 = OpLabel |
| 102 | %54 = OpAccessChain %_ptr_Function_float %x %int_1 |
| 103 | OpStore %54 %float_0 |
| 104 | OpBranch %42 |
| 105 | %42 = OpLabel |
| 106 | %56 = OpLoad %float %b |
| 107 | %57 = OpFSub %float %56 %float_1 |
| 108 | OpStore %b %57 |
| 109 | OpBranch %39 |
| 110 | %43 = OpLabel |
| 111 | %58 = OpLoad %v4float %x |
| 112 | OpReturnValue %58 |
| 113 | OpFunctionEnd |
| 114 | |
| 115 | 1 error |