| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Google spiregg; 0 |
| 4 |
; Bound: 48 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpMemoryModel Logical GLSL450 |
| 8 |
OpEntryPoint Fragment %PSMain "main" %in_var_COLOR %in_var_TEXCOORD0 %out_var_SV_TARGET |
| 9 |
OpExecutionMode %PSMain OriginUpperLeft |
| 10 |
; Not actually ESSL, but makes testing easier. |
| 11 |
OpSource ESSL 310 |
| 12 |
OpName %type_2d_image "type.2d.image" |
| 13 |
OpName %tex "tex" |
| 14 |
OpName %type_sampler "type.sampler" |
| 15 |
OpName %Samp "Samp" |
| 16 |
OpName %in_var_COLOR "in.var.COLOR" |
| 17 |
OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" |
| 18 |
OpName %out_var_SV_TARGET "out.var.SV_TARGET" |
| 19 |
OpName %PSMain "PSMain" |
| 20 |
OpName %PSInput "PSInput" |
| 21 |
OpMemberName %PSInput 0 "color" |
| 22 |
OpMemberName %PSInput 1 "uv" |
| 23 |
OpName %param_var_input "param.var.input" |
| 24 |
OpName %src_PSMain "src.PSMain" |
| 25 |
OpName %input "input" |
| 26 |
OpName %bb_entry "bb.entry" |
| 27 |
OpName %a "a" |
| 28 |
OpName %type_sampled_image "type.sampled.image" |
| 29 |
OpDecorate %in_var_COLOR Location 0 |
| 30 |
OpDecorate %in_var_TEXCOORD0 Location 1 |
| 31 |
OpDecorate %out_var_SV_TARGET Location 0 |
| 32 |
OpDecorate %tex DescriptorSet 0 |
| 33 |
OpDecorate %tex Binding 0 |
| 34 |
OpDecorate %Samp DescriptorSet 0 |
| 35 |
OpDecorate %Samp Binding 1 |
| 36 |
OpDecorate %tex RelaxedPrecision |
| 37 |
OpDecorate %a RelaxedPrecision |
| 38 |
OpDecorate %38 RelaxedPrecision |
| 39 |
OpDecorate %45 RelaxedPrecision |
| 40 |
OpDecorate %47 RelaxedPrecision |
| 41 |
%int = OpTypeInt 32 1 |
| 42 |
%int_0 = OpConstant %int 0 |
| 43 |
%int_1 = OpConstant %int 1 |
| 44 |
%float = OpTypeFloat 32 |
| 45 |
%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown |
| 46 |
%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image |
| 47 |
%type_sampler = OpTypeSampler |
| 48 |
%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler |
| 49 |
%v4float = OpTypeVector %float 4 |
| 50 |
%_ptr_Input_v4float = OpTypePointer Input %v4float |
| 51 |
%v2float = OpTypeVector %float 2 |
| 52 |
%_ptr_Input_v2float = OpTypePointer Input %v2float |
| 53 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 54 |
%void = OpTypeVoid |
| 55 |
%21 = OpTypeFunction %void |
| 56 |
%PSInput = OpTypeStruct %v4float %v2float |
| 57 |
%_ptr_Function_PSInput = OpTypePointer Function %PSInput |
| 58 |
%31 = OpTypeFunction %v4float %_ptr_Function_PSInput |
| 59 |
%_ptr_Function_v4float = OpTypePointer Function %v4float |
| 60 |
%_ptr_Function_v2float = OpTypePointer Function %v2float |
| 61 |
%type_sampled_image = OpTypeSampledImage %type_2d_image |
| 62 |
%tex = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant |
| 63 |
%Samp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant |
| 64 |
%in_var_COLOR = OpVariable %_ptr_Input_v4float Input |
| 65 |
%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input |
| 66 |
%out_var_SV_TARGET = OpVariable %_ptr_Output_v4float Output |
| 67 |
%PSMain = OpFunction %void None %21 |
| 68 |
%22 = OpLabel |
| 69 |
%param_var_input = OpVariable %_ptr_Function_PSInput Function |
| 70 |
%26 = OpLoad %v4float %in_var_COLOR |
| 71 |
%27 = OpLoad %v2float %in_var_TEXCOORD0 |
| 72 |
%28 = OpCompositeConstruct %PSInput %26 %27 |
| 73 |
OpStore %param_var_input %28 |
| 74 |
%29 = OpFunctionCall %v4float %src_PSMain %param_var_input |
| 75 |
OpStore %out_var_SV_TARGET %29 |
| 76 |
OpReturn |
| 77 |
OpFunctionEnd |
| 78 |
%src_PSMain = OpFunction %v4float None %31 |
| 79 |
%input = OpFunctionParameter %_ptr_Function_PSInput |
| 80 |
%bb_entry = OpLabel |
| 81 |
%a = OpVariable %_ptr_Function_v4float Function |
| 82 |
%36 = OpAccessChain %_ptr_Function_v4float %input %int_0 |
| 83 |
%37 = OpLoad %v4float %36 |
| 84 |
%38 = OpLoad %type_2d_image %tex |
| 85 |
%39 = OpLoad %type_sampler %Samp |
| 86 |
%41 = OpAccessChain %_ptr_Function_v2float %input %int_1 |
| 87 |
%42 = OpLoad %v2float %41 |
| 88 |
%44 = OpSampledImage %type_sampled_image %38 %39 |
| 89 |
%45 = OpImageSampleImplicitLod %v4float %44 %42 None |
| 90 |
%46 = OpFMul %v4float %37 %45 |
| 91 |
OpStore %a %46 |
| 92 |
%47 = OpLoad %v4float %a |
| 93 |
OpReturnValue %47 |
| 94 |
OpFunctionEnd |
| 95 |
|