| 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 %7 |
| OpName %src "src" ; id %11 |
| OpName %dest "dest" ; id %15 |
| OpName %main "main" ; id %6 |
| OpName %_0_color "_0_color" ; id %39 |
| |
| ; Annotations |
| OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId |
| OpDecorate %src Binding 0 |
| OpDecorate %src DescriptorSet 0 |
| OpDecorate %dest Binding 1 |
| OpDecorate %dest DescriptorSet 0 |
| OpDecorate %26 RelaxedPrecision |
| OpDecorate %34 RelaxedPrecision |
| OpDecorate %_0_color RelaxedPrecision |
| OpDecorate %42 RelaxedPrecision |
| OpDecorate %43 RelaxedPrecision |
| OpDecorate %46 RelaxedPrecision |
| OpDecorate %47 RelaxedPrecision |
| OpDecorate %53 RelaxedPrecision |
| OpDecorate %54 RelaxedPrecision |
| OpDecorate %55 RelaxedPrecision |
| OpDecorate %56 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 |
| %13 = OpTypeImage %float 2D 0 0 0 2 Rgba8 |
| %_ptr_UniformConstant_13 = OpTypePointer UniformConstant %13 |
| %src = OpVariable %_ptr_UniformConstant_13 UniformConstant ; Binding 0, DescriptorSet 0 |
| %dest = OpVariable %_ptr_UniformConstant_13 UniformConstant ; Binding 1, DescriptorSet 0 |
| %void = OpTypeVoid |
| %17 = OpTypeFunction %void |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %v2uint = OpTypeVector %uint 2 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %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 |
| %52 = OpConstantComposite %v3float %float_0_219999999 %float_0_670000017 %float_0_109999999 |
| |
| |
| ; Function main |
| %main = OpFunction %void None %17 |
| |
| %18 = OpLabel |
| %_0_color = OpVariable %_ptr_Function_v4float Function ; RelaxedPrecision |
| %21 = OpLoad %v3uint %sk_GlobalInvocationID |
| %22 = OpCompositeExtract %uint %21 0 |
| %26 = OpLoad %13 %src ; RelaxedPrecision |
| %25 = OpImageQuerySize %v2uint %26 |
| %23 = OpCompositeExtract %uint %25 0 |
| %27 = OpULessThan %bool %22 %23 |
| OpSelectionMerge %29 None |
| OpBranchConditional %27 %28 %29 |
| |
| %28 = OpLabel |
| %30 = OpLoad %v3uint %sk_GlobalInvocationID |
| %31 = OpCompositeExtract %uint %30 1 |
| %34 = OpLoad %13 %src ; RelaxedPrecision |
| %33 = OpImageQuerySize %v2uint %34 |
| %32 = OpCompositeExtract %uint %33 1 |
| %35 = OpULessThan %bool %31 %32 |
| OpBranch %29 |
| |
| %29 = OpLabel |
| %36 = OpPhi %bool %false %18 %35 %28 |
| OpSelectionMerge %38 None |
| OpBranchConditional %36 %37 %38 |
| |
| %37 = OpLabel |
| %43 = OpLoad %13 %src ; RelaxedPrecision |
| %44 = OpLoad %v3uint %sk_GlobalInvocationID |
| %45 = OpVectorShuffle %v2uint %44 %44 0 1 |
| %42 = OpImageRead %v4float %43 %45 ; RelaxedPrecision |
| OpStore %_0_color %42 |
| %47 = OpVectorShuffle %v3float %42 %42 0 1 2 ; RelaxedPrecision |
| %46 = OpDot %float %47 %52 ; RelaxedPrecision |
| %53 = OpCompositeConstruct %v3float %46 %46 %46 ; RelaxedPrecision |
| %54 = OpLoad %v4float %_0_color ; RelaxedPrecision |
| %55 = OpVectorShuffle %v4float %54 %53 4 5 6 3 ; RelaxedPrecision |
| OpStore %_0_color %55 |
| %56 = OpLoad %13 %dest ; RelaxedPrecision |
| %57 = OpLoad %v3uint %sk_GlobalInvocationID |
| %58 = OpVectorShuffle %v2uint %57 %57 0 1 |
| OpImageWrite %56 %58 %55 |
| OpBranch %38 |
| |
| %38 = OpLabel |
| OpReturn |
| OpFunctionEnd |