blob: b8aa1b6a6036400426f3a332b724e3aac970e1b1 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; Schema: 0
OpCapability Shader
%11 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %tint_insert_bits "tint_insert_bits"
OpName %v "v"
OpName %n "n"
OpName %offset "offset"
OpName %count "count"
OpName %f_1 "f_1"
OpName %v_0 "v"
OpName %n_0 "n"
OpName %offset_1 "offset_1"
OpName %count_0 "count"
OpName %f "f"
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%1 = OpTypeFunction %int %int %int %uint %uint
%uint_32 = OpConstant %uint 32
%void = OpTypeVoid
%17 = OpTypeFunction %void
%int_0 = OpConstant %int 0
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%_ptr_Function_uint = OpTypePointer Function %uint
%29 = OpConstantNull %uint
%tint_insert_bits = OpFunction %int None %1
%v = OpFunctionParameter %int
%n = OpFunctionParameter %int
%offset = OpFunctionParameter %uint
%count = OpFunctionParameter %uint
%9 = OpLabel
%10 = OpExtInst %uint %11 UMin %offset %uint_32
%14 = OpIAdd %uint %10 %count
%13 = OpExtInst %uint %11 UMin %uint_32 %14
%16 = OpISub %uint %13 %10
%15 = OpBitFieldInsert %int %v %n %10 %16
OpReturnValue %15
OpFunctionEnd
%f_1 = OpFunction %void None %17
%20 = OpLabel
%v_0 = OpVariable %_ptr_Function_int Function %24
%n_0 = OpVariable %_ptr_Function_int Function %24
%offset_1 = OpVariable %_ptr_Function_uint Function %29
%count_0 = OpVariable %_ptr_Function_uint Function %29
OpStore %v_0 %int_0
OpStore %n_0 %int_0
OpStore %offset_1 %uint_0
OpStore %count_0 %uint_0
%31 = OpLoad %int %v_0
%32 = OpLoad %int %n_0
%33 = OpLoad %uint %offset_1
%34 = OpLoad %uint %count_0
%35 = OpFunctionCall %int %tint_insert_bits %31 %32 %33 %34
OpReturn
OpFunctionEnd
%f = OpFunction %void None %17
%37 = OpLabel
%38 = OpFunctionCall %void %f_1
OpReturn
OpFunctionEnd