blob: 9281c0e37e0561a8779aa8024ea10a7fd5837fe7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 36
; Schema: 0
OpCapability Shader
%10 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %tint_extract_bits "tint_extract_bits"
OpName %v "v"
OpName %offset "offset"
OpName %count "count"
OpName %f_1 "f_1"
OpName %v_0 "v"
OpName %offset_1 "offset_1"
OpName %count_0 "count"
OpName %f "f"
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%1 = OpTypeFunction %int %int %uint %uint
%uint_32 = OpConstant %uint 32
%void = OpTypeVoid
%16 = OpTypeFunction %void
%int_0 = OpConstant %int 0
%_ptr_Function_int = OpTypePointer Function %int
%23 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%_ptr_Function_uint = OpTypePointer Function %uint
%27 = OpConstantNull %uint
%tint_extract_bits = OpFunction %int None %1
%v = OpFunctionParameter %int
%offset = OpFunctionParameter %uint
%count = OpFunctionParameter %uint
%8 = OpLabel
%9 = OpExtInst %uint %10 UMin %offset %uint_32
%13 = OpIAdd %uint %9 %count
%12 = OpExtInst %uint %10 UMin %uint_32 %13
%15 = OpISub %uint %12 %9
%14 = OpBitFieldSExtract %int %v %9 %15
OpReturnValue %14
OpFunctionEnd
%f_1 = OpFunction %void None %16
%19 = OpLabel
%v_0 = OpVariable %_ptr_Function_int Function %23
%offset_1 = OpVariable %_ptr_Function_uint Function %27
%count_0 = OpVariable %_ptr_Function_uint Function %27
OpStore %v_0 %int_0
OpStore %offset_1 %uint_0
OpStore %count_0 %uint_0
%29 = OpLoad %int %v_0
%30 = OpLoad %uint %offset_1
%31 = OpLoad %uint %count_0
%32 = OpFunctionCall %int %tint_extract_bits %29 %30 %31
OpReturn
OpFunctionEnd
%f = OpFunction %void None %16
%34 = OpLabel
%35 = OpFunctionCall %void %f_1
OpReturn
OpFunctionEnd