• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; SPIR-V
2; Version: 1.3
3; Generator: Khronos SPIR-V Tools Assembler; 0
4; Bound: 54
5; Schema: 0
6               OpCapability Shader
7          %1 = OpExtInstImport "GLSL.std.450"
8               OpMemoryModel Logical GLSL450
9               OpEntryPoint Fragment %main "main" %gl_FragCoord %o_color
10               OpExecutionMode %main OriginUpperLeft
11               OpSource GLSL 460
12               OpName %main "main"
13               OpName %myType "myType"
14               OpMemberName %myType 0 "data"
15               OpName %myData "myData"
16               OpName %uv "uv"
17               OpName %gl_FragCoord "gl_FragCoord"
18               OpName %index "index"
19               OpName %elt "elt"
20               OpName %o_color "o_color"
21               OpDecorate %gl_FragCoord BuiltIn FragCoord
22               OpDecorate %o_color Location 0
23       %void = OpTypeVoid
24         %11 = OpTypeFunction %void
25      %float = OpTypeFloat 32
26     %myType = OpTypeStruct %float
27       %uint = OpTypeInt 32 0
28     %uint_5 = OpConstant %uint 5
29%_arr_myType_uint_5 = OpTypeArray %myType %uint_5
30%_ptr_Private__arr_myType_uint_5 = OpTypePointer Private %_arr_myType_uint_5
31     %myData = OpVariable %_ptr_Private__arr_myType_uint_5 Private
32    %float_0 = OpConstant %float 0
33         %18 = OpConstantComposite %myType %float_0
34    %float_1 = OpConstant %float 1
35         %20 = OpConstantComposite %myType %float_1
36         %21 = OpConstantComposite %_arr_myType_uint_5 %18 %20 %18 %20 %18
37    %v2float = OpTypeVector %float 2
38%_ptr_Function_v2float = OpTypePointer Function %v2float
39    %v4float = OpTypeVector %float 4
40%_ptr_Input_v4float = OpTypePointer Input %v4float
41%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
42        %int = OpTypeInt 32 1
43%_ptr_Function_int = OpTypePointer Function %int
44     %uint_0 = OpConstant %uint 0
45%_ptr_Function_float = OpTypePointer Function %float
46    %float_4 = OpConstant %float 4
47%_ptr_Function_myType = OpTypePointer Function %myType
48%_ptr_Private_myType = OpTypePointer Private %myType
49      %int_0 = OpConstant %int 0
50       %bool = OpTypeBool
51%_ptr_Output_v4float = OpTypePointer Output %v4float
52    %o_color = OpVariable %_ptr_Output_v4float Output
53         %36 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
54         %37 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
55       %main = OpFunction %void None %11
56         %38 = OpLabel
57         %uv = OpVariable %_ptr_Function_v2float Function
58      %index = OpVariable %_ptr_Function_int Function
59        %elt = OpVariable %_ptr_Function_myType Function
60               OpStore %myData %21
61         %39 = OpLoad %v4float %gl_FragCoord
62         %40 = OpVectorShuffle %v2float %39 %39 0 1
63               OpStore %uv %40
64         %41 = OpAccessChain %_ptr_Function_float %uv %uint_0
65         %42 = OpLoad %float %41
66         %43 = OpFMod %float %42 %float_4
67         %44 = OpConvertFToS %int %43
68               OpStore %index %44
69         %45 = OpLoad %int %index
70         %46 = OpAccessChain %_ptr_Private_myType %myData %45
71         %47 = OpLoad %myType %46
72               OpStore %elt %47
73         %48 = OpAccessChain %_ptr_Function_float %elt %int_0
74         %49 = OpLoad %float %48
75         %50 = OpFOrdGreaterThan %bool %49 %float_0
76               OpSelectionMerge %51 None
77               OpBranchConditional %50 %52 %53
78         %52 = OpLabel
79               OpStore %o_color %36
80               OpBranch %51
81         %53 = OpLabel
82               OpStore %o_color %37
83               OpBranch %51
84         %51 = OpLabel
85               OpReturn
86               OpFunctionEnd
87