|
| 1 | +; SPIR-V |
| 2 | +; Version: 1.5 |
| 3 | +; Generator: Google rspirv; 0 |
| 4 | +; Bound: 68 |
| 5 | +; Schema: 0 |
| 6 | + OpCapability Shader |
| 7 | + OpCapability VulkanMemoryModel |
| 8 | + OpMemoryModel Logical Vulkan |
| 9 | + OpEntryPoint Fragment %1 "fragment" %gl_FragCoord %3 |
| 10 | + OpEntryPoint Vertex %4 "vertex" %gl_VertexIndex %gl_Position |
| 11 | + OpExecutionMode %1 OriginUpperLeft |
| 12 | + OpDecorate %gl_FragCoord BuiltIn FragCoord |
| 13 | + OpDecorate %10 SpecId 100 |
| 14 | + OpDecorate %3 Location 0 |
| 15 | + OpDecorate %_arr_v4float_uint_6 ArrayStride 16 |
| 16 | + OpDecorate %gl_VertexIndex BuiltIn VertexIndex |
| 17 | + OpDecorate %gl_Position BuiltIn Position |
| 18 | + OpDecorate %gl_Position Invariant |
| 19 | + %float = OpTypeFloat 32 |
| 20 | + %v4float = OpTypeVector %float 4 |
| 21 | +%_ptr_Input_v4float = OpTypePointer Input %v4float |
| 22 | +%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 23 | + %void = OpTypeVoid |
| 24 | + %17 = OpTypeFunction %void |
| 25 | +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input |
| 26 | + %bool = OpTypeBool |
| 27 | + %uint = OpTypeInt 32 0 |
| 28 | + %10 = OpSpecConstant %uint 2 |
| 29 | + %uint_1 = OpConstant %uint 1 |
| 30 | + %v2float = OpTypeVector %float 2 |
| 31 | +%_ptr_Output_float = OpTypePointer Output %float |
| 32 | + %3 = OpVariable %_ptr_Output_v4float Output |
| 33 | + %uint_0 = OpConstant %uint 0 |
| 34 | +%_ptr_Input_uint = OpTypePointer Input %uint |
| 35 | + %uint_6 = OpConstant %uint 6 |
| 36 | +%_arr_v4float_uint_6 = OpTypeArray %v4float %uint_6 |
| 37 | +%_ptr_Function__arr_v4float_uint_6 = OpTypePointer Function %_arr_v4float_uint_6 |
| 38 | +%gl_VertexIndex = OpVariable %_ptr_Input_uint Input |
| 39 | + %float_n1 = OpConstant %float -1 |
| 40 | + %float_0 = OpConstant %float 0 |
| 41 | + %float_1 = OpConstant %float 1 |
| 42 | + %32 = OpConstantComposite %v4float %float_n1 %float_n1 %float_0 %float_1 |
| 43 | + %33 = OpConstantComposite %v4float %float_1 %float_n1 %float_0 %float_1 |
| 44 | + %34 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_1 |
| 45 | + %35 = OpConstantComposite %v4float %float_n1 %float_1 %float_0 %float_1 |
| 46 | + %36 = OpConstantComposite %_arr_v4float_uint_6 %32 %33 %34 %34 %35 %32 |
| 47 | +%_ptr_Function_v4float = OpTypePointer Function %v4float |
| 48 | +%gl_Position = OpVariable %_ptr_Output_v4float Output |
| 49 | + %float_0_25 = OpConstant %float 0.25 |
| 50 | + %float_0_5 = OpConstant %float 0.5 |
| 51 | + %1 = OpFunction %void None %17 |
| 52 | + %38 = OpLabel |
| 53 | + %39 = OpLoad %v4float %gl_FragCoord |
| 54 | + %40 = OpCompositeExtract %float %39 0 |
| 55 | + %41 = OpCompositeExtract %float %39 1 |
| 56 | + %42 = OpIEqual %bool %10 %uint_1 |
| 57 | + OpSelectionMerge %43 None |
| 58 | + OpBranchConditional %42 %44 %45 |
| 59 | + %44 = OpLabel |
| 60 | + %46 = OpFMul %float %40 %float_0_5 |
| 61 | + %47 = OpFMul %float %41 %float_0_5 |
| 62 | + %48 = OpCompositeConstruct %v2float %46 %47 |
| 63 | + OpBranch %43 |
| 64 | + %45 = OpLabel |
| 65 | + %49 = OpFMul %float %40 %float_0_25 |
| 66 | + %50 = OpFMul %float %41 %float_0_25 |
| 67 | + %51 = OpCompositeConstruct %v2float %49 %50 |
| 68 | + OpBranch %43 |
| 69 | + %43 = OpLabel |
| 70 | + %52 = OpPhi %v2float %48 %44 %51 %45 |
| 71 | + %53 = OpCompositeExtract %float %52 0 |
| 72 | + %54 = OpAccessChain %_ptr_Output_float %3 %uint_0 |
| 73 | + OpStore %54 %53 |
| 74 | + %55 = OpCompositeExtract %float %52 1 |
| 75 | + %56 = OpAccessChain %_ptr_Output_float %3 %uint_1 |
| 76 | + OpStore %56 %55 |
| 77 | + OpReturn |
| 78 | + OpFunctionEnd |
| 79 | + %4 = OpFunction %void None %17 |
| 80 | + %57 = OpLabel |
| 81 | + %58 = OpVariable %_ptr_Function__arr_v4float_uint_6 Function |
| 82 | + %59 = OpLoad %uint %gl_VertexIndex |
| 83 | + OpStore %58 %36 |
| 84 | + %60 = OpULessThan %bool %59 %uint_6 |
| 85 | + OpSelectionMerge %61 None |
| 86 | + OpBranchConditional %60 %62 %63 |
| 87 | + %62 = OpLabel |
| 88 | + %64 = OpInBoundsAccessChain %_ptr_Function_v4float %58 %59 |
| 89 | + %65 = OpLoad %v4float %64 |
| 90 | + OpStore %gl_Position %65 |
| 91 | + OpBranch %61 |
| 92 | + %63 = OpLabel |
| 93 | + OpBranch %61 |
| 94 | + %61 = OpLabel |
| 95 | + OpReturn |
| 96 | + OpFunctionEnd |
0 commit comments