dawn-cmake/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm

266 lines
13 KiB
Plaintext
Raw Normal View History

builtins/gen/var/textureSampleLevel/979816.wgsl:29:24 warning: use of deprecated builtin
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2);
^^^^^^^^^^^^^^^^^^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 148
; Schema: 0
OpCapability Shader
%31 = 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"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %textureSampleExternal "textureSampleExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %smp "smp"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %textureSampleLevel_979816 "textureSampleLevel_979816"
OpName %arg_2 "arg_2"
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 2
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
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 3
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpDecorate %arg_1 DescriptorSet 1
OpDecorate %arg_1 Binding 1
%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
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
%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
%24 = OpTypeSampler
%_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24
%arg_1 = OpVariable %_ptr_UniformConstant_24 UniformConstant
%25 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%45 = OpConstantNull %v3float
%v2float = OpTypeVector %float 2
%65 = OpTypeFunction %v4float %11 %11 %24 %v2float %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%82 = OpTypeSampledImage %11
%float_1 = OpConstant %float 1
%98 = OpConstantNull %uint
%void = OpTypeVoid
%116 = OpTypeFunction %void
%120 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
%123 = OpConstantNull %v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%135 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %25
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
%29 = OpLabel
%43 = OpVariable %_ptr_Function_v3float Function %45
%55 = OpVariable %_ptr_Function_v3float Function %45
%61 = OpVariable %_ptr_Function_v3float Function %45
%30 = OpExtInst %v3float %31 FAbs %v
%32 = OpCompositeExtract %float %params 4
%33 = OpCompositeConstruct %v3float %32 %32 %32
%34 = OpFOrdLessThan %v3bool %30 %33
%37 = OpExtInst %v3float %31 FSign %v
%38 = OpCompositeExtract %float %params 3
%39 = OpExtInst %v3float %31 FAbs %v
%40 = OpVectorTimesScalar %v3float %39 %38
%41 = OpCompositeExtract %float %params 6
%46 = OpCompositeConstruct %v3float %41 %41 %41
%42 = OpFAdd %v3float %40 %46
%47 = OpFMul %v3float %37 %42
%48 = OpExtInst %v3float %31 FSign %v
%50 = OpCompositeExtract %float %params 1
%51 = OpExtInst %v3float %31 FAbs %v
%52 = OpVectorTimesScalar %v3float %51 %50
%53 = OpCompositeExtract %float %params 2
%56 = OpCompositeConstruct %v3float %53 %53 %53
%54 = OpFAdd %v3float %52 %56
%57 = OpCompositeExtract %float %params 0
%58 = OpCompositeConstruct %v3float %57 %57 %57
%49 = OpExtInst %v3float %31 Pow %54 %58
%59 = OpCompositeExtract %float %params 5
%62 = OpCompositeConstruct %v3float %59 %59 %59
%60 = OpFAdd %v3float %49 %62
%63 = OpFMul %v3float %48 %60
%64 = OpSelect %v3float %34 %47 %63
OpReturnValue %64
OpFunctionEnd
%textureSampleExternal = OpFunction %v4float None %65
%plane0 = OpFunctionParameter %11
%plane1 = OpFunctionParameter %11
%smp = OpFunctionParameter %24
%coord = OpFunctionParameter %v2float
%params_0 = OpFunctionParameter %ExternalTextureParams
%73 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %45
%75 = OpCompositeExtract %uint %params_0 0
%77 = OpIEqual %bool %75 %uint_1
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
%83 = OpSampledImage %82 %plane0 %smp
%81 = OpImageSampleExplicitLod %v4float %83 %coord Lod %8
%84 = OpVectorShuffle %v3float %81 %81 0 1 2
OpStore %color %84
OpBranch %78
%80 = OpLabel
%86 = OpSampledImage %82 %plane0 %smp
%85 = OpImageSampleExplicitLod %v4float %86 %coord Lod %8
%87 = OpCompositeExtract %float %85 0
%89 = OpSampledImage %82 %plane1 %smp
%88 = OpImageSampleExplicitLod %v4float %89 %coord Lod %8
%90 = OpVectorShuffle %v2float %88 %88 0 1
%91 = OpCompositeExtract %float %90 0
%92 = OpCompositeExtract %float %90 1
%94 = OpCompositeConstruct %v4float %87 %91 %92 %float_1
%95 = OpCompositeExtract %mat3v4float %params_0 2
%96 = OpVectorTimesMatrix %v3float %94 %95
OpStore %color %96
OpBranch %78
%78 = OpLabel
%97 = OpCompositeExtract %uint %params_0 1
%99 = OpIEqual %bool %97 %98
OpSelectionMerge %100 None
OpBranchConditional %99 %101 %100
%101 = OpLabel
%103 = OpLoad %v3float %color
%104 = OpCompositeExtract %GammaTransferParams %params_0 3
%102 = OpFunctionCall %v3float %gammaCorrection %103 %104
OpStore %color %102
%105 = OpCompositeExtract %mat3v3float %params_0 5
%106 = OpLoad %v3float %color
%107 = OpMatrixTimesVector %v3float %105 %106
OpStore %color %107
%109 = OpLoad %v3float %color
%110 = OpCompositeExtract %GammaTransferParams %params_0 4
%108 = OpFunctionCall %v3float %gammaCorrection %109 %110
OpStore %color %108
OpBranch %100
%100 = OpLabel
%111 = OpLoad %v3float %color
%112 = OpCompositeExtract %float %111 0
%113 = OpCompositeExtract %float %111 1
%114 = OpCompositeExtract %float %111 2
%115 = OpCompositeConstruct %v4float %112 %113 %114 %float_1
OpReturnValue %115
OpFunctionEnd
%textureSampleLevel_979816 = OpFunction %void None %116
%119 = OpLabel
%arg_2 = OpVariable %_ptr_Function_v2float Function %123
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_2 %120
%125 = OpLoad %11 %arg_0
%126 = OpLoad %11 %ext_tex_plane_1
%127 = OpLoad %24 %arg_1
%128 = OpLoad %v2float %arg_2
%131 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%132 = OpLoad %ExternalTextureParams %131
%124 = OpFunctionCall %v4float %textureSampleExternal %125 %126 %127 %128 %132
OpStore %res %124
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %135
%137 = OpLabel
%138 = OpFunctionCall %void %textureSampleLevel_979816
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %116
%140 = OpLabel
%141 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %141
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %116
%143 = OpLabel
%144 = OpFunctionCall %void %textureSampleLevel_979816
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %116
%146 = OpLabel
%147 = OpFunctionCall %void %textureSampleLevel_979816
OpReturn
OpFunctionEnd