| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 50 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| %41 = OpExtInstImport "GLSL.std.450" | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint Fragment %main "main" | |
| OpExecutionMode %main OriginUpperLeft | |
| OpMemberName %v_block_tint_explicit_layout 0 "inner" | |
| OpName %v_block_tint_explicit_layout "v_block_tint_explicit_layout" | |
| OpMemberName %out_block 0 "inner" | |
| OpName %out_block "out_block" | |
| OpName %main "main" | |
| OpName %offset "offset" | |
| OpMemberName %add_carry_result_u32 0 "result" | |
| OpMemberName %add_carry_result_u32 1 "carry" | |
| OpName %add_carry_result_u32 "add_carry_result_u32" | |
| OpDecorate %_runtimearr_v4uint ArrayStride 16 | |
| OpMemberDecorate %v_block_tint_explicit_layout 0 Offset 0 | |
| OpDecorate %v_block_tint_explicit_layout Block | |
| OpDecorate %1 DescriptorSet 0 | |
| OpDecorate %1 Binding 0 | |
| OpDecorate %1 NonWritable | |
| OpMemberDecorate %out_block 0 Offset 0 | |
| OpDecorate %out_block Block | |
| OpDecorate %7 DescriptorSet 0 | |
| OpDecorate %7 Binding 1 | |
| OpDecorate %7 Coherent | |
| %uint = OpTypeInt 32 0 | |
| %v4uint = OpTypeVector %uint 4 | |
| %_runtimearr_v4uint = OpTypeRuntimeArray %v4uint | |
| %v_block_tint_explicit_layout = OpTypeStruct %_runtimearr_v4uint | |
| %_ptr_StorageBuffer_v_block_tint_explicit_layout = OpTypePointer StorageBuffer %v_block_tint_explicit_layout | |
| %1 = OpVariable %_ptr_StorageBuffer_v_block_tint_explicit_layout StorageBuffer | |
| %out_block = OpTypeStruct %v4uint | |
| %_ptr_StorageBuffer_out_block = OpTypePointer StorageBuffer %out_block | |
| %7 = OpVariable %_ptr_StorageBuffer_out_block StorageBuffer | |
| %void = OpTypeVoid | |
| %12 = OpTypeFunction %void | |
| %offset = OpConstant %uint 16 | |
| %uint_4294967280 = OpConstant %uint 4294967280 | |
| %_ptr_StorageBuffer__runtimearr_v4uint = OpTypePointer StorageBuffer %_runtimearr_v4uint | |
| %uint_0 = OpConstant %uint 0 | |
| %add_carry_result_u32 = OpTypeStruct %uint %uint | |
| %bool = OpTypeBool | |
| %uint_4294967295 = OpConstant %uint 4294967295 | |
| %uint_1 = OpConstant %uint 1 | |
| %int = OpTypeInt 32 1 | |
| %int_0 = OpConstant %int 0 | |
| %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint | |
| %_ptr_StorageBuffer_v4uint_0 = OpTypePointer StorageBuffer %v4uint | |
| %main = OpFunction %void None %12 | |
| %13 = OpLabel | |
| %15 = OpBitwiseAnd %uint %offset %uint_4294967280 | |
| %17 = OpAccessChain %_ptr_StorageBuffer__runtimearr_v4uint %1 %uint_0 | |
| %20 = OpArrayLength %uint %1 0 | |
| %21 = OpIMul %uint %20 %offset | |
| %22 = OpIAddCarry %add_carry_result_u32 %offset %15 | |
| %24 = OpCompositeExtract %uint %22 0 | |
| %25 = OpCompositeExtract %uint %22 1 | |
| %26 = OpIEqual %bool %25 %uint_0 | |
| %28 = OpSelect %uint %26 %24 %uint_4294967295 | |
| %30 = OpULessThan %bool %21 %28 | |
| %31 = OpSelect %uint %30 %uint_0 %15 | |
| %32 = OpSelect %uint %30 %offset %offset | |
| %33 = OpIMul %uint %31 %uint_1 | |
| %35 = OpUDiv %uint %32 %offset | |
| %36 = OpISub %uint %35 %uint_1 | |
| %37 = OpBitcast %uint %int_0 | |
| %40 = OpExtInst %uint %41 UMin %37 %36 | |
| %42 = OpIMul %uint %40 %offset | |
| %43 = OpIAdd %uint %33 %42 | |
| %44 = OpUDiv %uint %43 %offset | |
| %45 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0 %44 | |
| %47 = OpLoad %v4uint %45 None | |
| %48 = OpAccessChain %_ptr_StorageBuffer_v4uint_0 %7 %uint_0 | |
| OpStore %48 %47 None | |
| OpReturn | |
| OpFunctionEnd |