dawn-cmake/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm

251 lines
12 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 139
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
OpMemberName %GammaTransferParams 2 "B"
OpMemberName %GammaTransferParams 3 "C"
OpMemberName %GammaTransferParams 4 "D"
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
OpMemberDecorate %GammaTransferParams 3 Offset 12
OpMemberDecorate %GammaTransferParams 4 Offset 16
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%11 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%uint = OpTypeInt 32 0
%mat3v4float = OpTypeMatrix %v4float 3
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%43 = OpConstantNull %v3float
%v2uint = OpTypeVector %uint 2
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%94 = OpConstantNull %uint
%void = OpTypeVoid
%112 = OpTypeFunction %void
%119 = OpConstantComposite %v2uint %uint_1 %uint_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%126 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
%27 = OpLabel
%41 = OpVariable %_ptr_Function_v3float Function %43
%53 = OpVariable %_ptr_Function_v3float Function %43
%59 = OpVariable %_ptr_Function_v3float Function %43
%28 = OpExtInst %v3float %29 FAbs %v
%30 = OpCompositeExtract %float %params 4
%31 = OpCompositeConstruct %v3float %30 %30 %30
%32 = OpFOrdLessThan %v3bool %28 %31
%35 = OpExtInst %v3float %29 FSign %v
%36 = OpCompositeExtract %float %params 3
%37 = OpExtInst %v3float %29 FAbs %v
%38 = OpVectorTimesScalar %v3float %37 %36
%39 = OpCompositeExtract %float %params 6
%44 = OpCompositeConstruct %v3float %39 %39 %39
%40 = OpFAdd %v3float %38 %44
%45 = OpFMul %v3float %35 %40
%46 = OpExtInst %v3float %29 FSign %v
%48 = OpCompositeExtract %float %params 1
%49 = OpExtInst %v3float %29 FAbs %v
%50 = OpVectorTimesScalar %v3float %49 %48
%51 = OpCompositeExtract %float %params 2
%54 = OpCompositeConstruct %v3float %51 %51 %51
%52 = OpFAdd %v3float %50 %54
%55 = OpCompositeExtract %float %params 0
%56 = OpCompositeConstruct %v3float %55 %55 %55
%47 = OpExtInst %v3float %29 Pow %52 %56
%57 = OpCompositeExtract %float %params 5
%60 = OpCompositeConstruct %v3float %57 %57 %57
%58 = OpFAdd %v3float %47 %60
%61 = OpFMul %v3float %46 %58
%62 = OpSelect %v3float %32 %45 %61
OpReturnValue %62
OpFunctionEnd
%textureLoadExternal = OpFunction %v4float None %63
%plane0 = OpFunctionParameter %11
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2uint
%params_0 = OpFunctionParameter %ExternalTextureParams
%70 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%72 = OpCompositeExtract %uint %params_0 0
%74 = OpIEqual %bool %72 %uint_1
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
OpStore %color %81
OpBranch %75
%77 = OpLabel
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %75
%75 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%textureLoad_1bfdfb = OpFunction %void None %112
%115 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%117 = OpLoad %11 %arg_0
%118 = OpLoad %11 %ext_tex_plane_1
%122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%123 = OpLoad %ExternalTextureParams %122
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
OpStore %res %116
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %126
%128 = OpLabel
%129 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %112
%131 = OpLabel
%132 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %132
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %112
%134 = OpLabel
%135 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %112
%137 = OpLabel
%138 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd