blob: c1999296e68875437b2358c7feee621f5551f1a8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 44
; Schema: 0
OpCapability Shader
%24 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %result_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %result_1_1 "result_1_1"
OpName %result "result"
OpName %gl_FragCoord "gl_FragCoord"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "result_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %result_1_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%result_1_1 = OpVariable %_ptr_Output_v4float Output %7
%_ptr_Private_v4float = OpTypePointer Private %v4float
%result = OpVariable %_ptr_Private_v4float Private %7
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%11 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%uint_1 = OpConstant %uint 1
%float_255 = OpConstant %float 255
%float_0 = OpConstant %float 0
%main_out = OpTypeStruct %v4float
%31 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %11
%14 = OpLabel
%18 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%19 = OpLoad %float %18
%21 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%22 = OpLoad %float %21
%23 = OpExtInst %float %24 Floor %19
%26 = OpFDiv %float %23 %float_255
%27 = OpExtInst %float %24 Floor %22
%28 = OpFDiv %float %27 %float_255
%30 = OpCompositeConstruct %v4float %26 %28 %float_0 %float_0
OpStore %result %30
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %31
%gl_FragCoord_param = OpFunctionParameter %v4float
%35 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%36 = OpFunctionCall %void %main_1
%37 = OpLoad %v4float %result
%38 = OpCompositeConstruct %main_out %37
OpReturnValue %38
OpFunctionEnd
%main = OpFunction %void None %11
%40 = OpLabel
%42 = OpLoad %v4float %gl_FragCoord_param_1
%41 = OpFunctionCall %main_out %main_inner %42
%43 = OpCompositeExtract %v4float %41 0
OpStore %result_1_1 %43
OpReturn
OpFunctionEnd