| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 20 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability Geometry |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %main_primitive_index_Input %main_loc0_Output |
| OpExecutionMode %main OriginUpperLeft |
| OpName %main_primitive_index_Input "main_primitive_index_Input" |
| OpName %main_loc0_Output "main_loc0_Output" |
| OpName %main_inner "main_inner" |
| OpName %prim_idx "prim_idx" |
| OpName %main "main" |
| OpDecorate %main_primitive_index_Input Flat |
| OpDecorate %main_primitive_index_Input BuiltIn PrimitiveId |
| OpDecorate %main_loc0_Output Location 0 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_primitive_index_Input = OpVariable %_ptr_Input_uint Input |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %main_loc0_Output = OpVariable %_ptr_Output_v4float Output |
| %10 = OpTypeFunction %v4float %uint |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void |
| %main_inner = OpFunction %v4float None %10 |
| %prim_idx = OpFunctionParameter %uint |
| %11 = OpLabel |
| %12 = OpConvertUToF %float %prim_idx |
| %13 = OpCompositeConstruct %v4float %12 %12 %12 %12 |
| OpReturnValue %13 |
| OpFunctionEnd |
| %main = OpFunction %void None %16 |
| %17 = OpLabel |
| %18 = OpLoad %uint %main_primitive_index_Input None |
| %19 = OpFunctionCall %v4float %main_inner %18 |
| OpStore %main_loc0_Output %19 None |
| OpReturn |
| OpFunctionEnd |