blob: c5ec4da88538fd817b387a15a5121199622c0c9c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 23
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %tint_mod "tint_mod"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %f "f"
OpName %a "a"
OpName %b "b"
%uint = OpTypeInt 32 0
%1 = OpTypeFunction %uint %uint %uint
%8 = OpConstantNull %uint
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%13 = OpTypeFunction %void
%_ptr_Function_uint = OpTypePointer Function %uint
%tint_mod = OpFunction %uint None %1
%lhs = OpFunctionParameter %uint
%rhs = OpFunctionParameter %uint
%6 = OpLabel
%9 = OpIEqual %bool %rhs %8
%7 = OpSelect %uint %9 %uint_1 %rhs
%12 = OpUMod %uint %lhs %7
OpReturnValue %12
OpFunctionEnd
%f = OpFunction %void None %13
%16 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %8
%b = OpVariable %_ptr_Function_uint Function %8
OpStore %a %uint_1
OpStore %b %8
%21 = OpLoad %uint %a
%22 = OpLoad %uint %b
%20 = OpFunctionCall %uint %tint_mod %21 %22
OpReturn
OpFunctionEnd