blob: c6a90593248762e2cc03fb44b826679dd9b2b9c0 [file] [log] [blame]
OpCapability ImageQuery
OpCapability Shader
%5 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID
OpExecutionMode %main LocalSize 16 16 1
; Debug Information
OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" ; id %8
OpName %src "src" ; id %12
OpName %dest "dest" ; id %16
OpName %desaturate_vTT "desaturate_vTT" ; id %6
OpName %color "color" ; id %22
OpName %main "main" ; id %7
; Annotations
OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %src Binding 0
OpDecorate %src DescriptorSet 0
OpDecorate %dest Binding 1
OpDecorate %dest DescriptorSet 0
OpDecorate %color RelaxedPrecision
OpDecorate %25 RelaxedPrecision
OpDecorate %26 RelaxedPrecision
OpDecorate %30 RelaxedPrecision
OpDecorate %31 RelaxedPrecision
OpDecorate %37 RelaxedPrecision
OpDecorate %38 RelaxedPrecision
OpDecorate %39 RelaxedPrecision
OpDecorate %40 RelaxedPrecision
OpDecorate %51 RelaxedPrecision
OpDecorate %59 RelaxedPrecision
; Types, variables and constants
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input ; BuiltIn GlobalInvocationId
%float = OpTypeFloat 32
%14 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
%src = OpVariable %_ptr_UniformConstant_14 UniformConstant ; Binding 0, DescriptorSet 0
%dest = OpVariable %_ptr_UniformConstant_14 UniformConstant ; Binding 1, DescriptorSet 0
%void = OpTypeVoid
%18 = OpTypeFunction %void %_ptr_UniformConstant_14 %_ptr_UniformConstant_14
%v4float = OpTypeVector %float 4
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%float_0_219999999 = OpConstant %float 0.219999999
%float_0_670000017 = OpConstant %float 0.670000017
%float_0_109999999 = OpConstant %float 0.109999999
%36 = OpConstantComposite %v3float %float_0_219999999 %float_0_670000017 %float_0_109999999
%43 = OpTypeFunction %void
%bool = OpTypeBool
%false = OpConstantFalse %bool
; Function desaturate_vTT
%desaturate_vTT = OpFunction %void None %18
%19 = OpFunctionParameter %_ptr_UniformConstant_14
%20 = OpFunctionParameter %_ptr_UniformConstant_14
%21 = OpLabel
%color = OpVariable %_ptr_Function_v4float Function ; RelaxedPrecision
%26 = OpLoad %14 %19 ; RelaxedPrecision
%27 = OpLoad %v3uint %sk_GlobalInvocationID
%28 = OpVectorShuffle %v2uint %27 %27 0 1
%25 = OpImageRead %v4float %26 %28 ; RelaxedPrecision
OpStore %color %25
%31 = OpVectorShuffle %v3float %25 %25 0 1 2 ; RelaxedPrecision
%30 = OpDot %float %31 %36 ; RelaxedPrecision
%37 = OpCompositeConstruct %v3float %30 %30 %30 ; RelaxedPrecision
%38 = OpLoad %v4float %color ; RelaxedPrecision
%39 = OpVectorShuffle %v4float %38 %37 4 5 6 3 ; RelaxedPrecision
OpStore %color %39
%40 = OpLoad %14 %20 ; RelaxedPrecision
%41 = OpLoad %v3uint %sk_GlobalInvocationID
%42 = OpVectorShuffle %v2uint %41 %41 0 1
OpImageWrite %40 %42 %39
OpReturn
OpFunctionEnd
; Function main
%main = OpFunction %void None %43
%44 = OpLabel
%47 = OpLoad %v3uint %sk_GlobalInvocationID
%48 = OpCompositeExtract %uint %47 0
%51 = OpLoad %14 %src ; RelaxedPrecision
%50 = OpImageQuerySize %v2uint %51
%49 = OpCompositeExtract %uint %50 0
%52 = OpULessThan %bool %48 %49
OpSelectionMerge %54 None
OpBranchConditional %52 %53 %54
%53 = OpLabel
%55 = OpLoad %v3uint %sk_GlobalInvocationID
%56 = OpCompositeExtract %uint %55 1
%59 = OpLoad %14 %src ; RelaxedPrecision
%58 = OpImageQuerySize %v2uint %59
%57 = OpCompositeExtract %uint %58 1
%60 = OpULessThan %bool %56 %57
OpBranch %54
%54 = OpLabel
%61 = OpPhi %bool %false %44 %60 %53
OpSelectionMerge %63 None
OpBranchConditional %61 %62 %63
%62 = OpLabel
%64 = OpFunctionCall %void %desaturate_vTT %src %dest
OpBranch %63
%63 = OpLabel
OpReturn
OpFunctionEnd