blob: 5c761952d2afeb5e7b8b9e7fa2c54433ded3c4d0 [file] [log] [blame]
Ben Claytonc0af5c52022-06-02 14:36:10 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Ben Clayton77a90cb2023-03-06 18:25:08 +00004; Bound: 46
Ben Claytonc0af5c52022-06-02 14:36:10 +00005; Schema: 0
6 OpCapability Shader
Ben Clayton77a90cb2023-03-06 18:25:08 +00007 %24 = OpExtInstImport "GLSL.std.450"
Ben Claytonc0af5c52022-06-02 14:36:10 +00008 OpMemoryModel Logical GLSL450
9 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
10 OpEntryPoint Fragment %fragment_main "fragment_main"
11 OpEntryPoint GLCompute %compute_main "compute_main"
12 OpExecutionMode %fragment_main OriginUpperLeft
13 OpExecutionMode %compute_main LocalSize 1 1 1
14 OpName %value "value"
15 OpName %vertex_point_size "vertex_point_size"
Ben Clayton77a90cb2023-03-06 18:25:08 +000016 OpName %prevent_dce_block "prevent_dce_block"
17 OpMemberName %prevent_dce_block 0 "inner"
18 OpName %prevent_dce "prevent_dce"
Ben Claytonc0af5c52022-06-02 14:36:10 +000019 OpName %cross_041cb0 "cross_041cb0"
20 OpName %arg_0 "arg_0"
21 OpName %arg_1 "arg_1"
22 OpName %res "res"
23 OpName %vertex_main_inner "vertex_main_inner"
24 OpName %vertex_main "vertex_main"
25 OpName %fragment_main "fragment_main"
26 OpName %compute_main "compute_main"
27 OpDecorate %value BuiltIn Position
28 OpDecorate %vertex_point_size BuiltIn PointSize
Ben Clayton77a90cb2023-03-06 18:25:08 +000029 OpDecorate %prevent_dce_block Block
30 OpMemberDecorate %prevent_dce_block 0 Offset 0
31 OpDecorate %prevent_dce DescriptorSet 2
32 OpDecorate %prevent_dce Binding 0
Ben Claytonc0af5c52022-06-02 14:36:10 +000033 %float = OpTypeFloat 32
34 %v4float = OpTypeVector %float 4
35%_ptr_Output_v4float = OpTypePointer Output %v4float
36 %5 = OpConstantNull %v4float
37 %value = OpVariable %_ptr_Output_v4float Output %5
38%_ptr_Output_float = OpTypePointer Output %float
39 %8 = OpConstantNull %float
40%vertex_point_size = OpVariable %_ptr_Output_float Output %8
Ben Claytonc0af5c52022-06-02 14:36:10 +000041 %v3float = OpTypeVector %float 3
Ben Clayton77a90cb2023-03-06 18:25:08 +000042%prevent_dce_block = OpTypeStruct %v3float
43%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
44%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
45 %void = OpTypeVoid
46 %13 = OpTypeFunction %void
Ben Claytonc0af5c52022-06-02 14:36:10 +000047 %float_1 = OpConstant %float 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000048 %18 = OpConstantComposite %v3float %float_1 %float_1 %float_1
Ben Clayton4b606152022-11-04 17:06:03 +000049%_ptr_Function_v3float = OpTypePointer Function %v3float
Ben Clayton77a90cb2023-03-06 18:25:08 +000050 %21 = OpConstantNull %v3float
51 %uint = OpTypeInt 32 0
52 %uint_0 = OpConstant %uint 0
53%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
54 %33 = OpTypeFunction %v4float
55%cross_041cb0 = OpFunction %void None %13
56 %16 = OpLabel
57 %arg_0 = OpVariable %_ptr_Function_v3float Function %21
58 %arg_1 = OpVariable %_ptr_Function_v3float Function %21
59 %res = OpVariable %_ptr_Function_v3float Function %21
60 OpStore %arg_0 %18
61 OpStore %arg_1 %18
62 %25 = OpLoad %v3float %arg_0
63 %26 = OpLoad %v3float %arg_1
64 %23 = OpExtInst %v3float %24 Cross %25 %26
65 OpStore %res %23
66 %31 = OpAccessChain %_ptr_StorageBuffer_v3float %prevent_dce %uint_0
67 %32 = OpLoad %v3float %res
68 OpStore %31 %32
Ben Claytonc0af5c52022-06-02 14:36:10 +000069 OpReturn
70 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000071%vertex_main_inner = OpFunction %v4float None %33
72 %35 = OpLabel
73 %36 = OpFunctionCall %void %cross_041cb0
Ben Claytonc0af5c52022-06-02 14:36:10 +000074 OpReturnValue %5
75 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000076%vertex_main = OpFunction %void None %13
77 %38 = OpLabel
78 %39 = OpFunctionCall %v4float %vertex_main_inner
79 OpStore %value %39
Ben Claytonc0af5c52022-06-02 14:36:10 +000080 OpStore %vertex_point_size %float_1
81 OpReturn
82 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000083%fragment_main = OpFunction %void None %13
84 %41 = OpLabel
85 %42 = OpFunctionCall %void %cross_041cb0
Ben Claytonc0af5c52022-06-02 14:36:10 +000086 OpReturn
87 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000088%compute_main = OpFunction %void None %13
89 %44 = OpLabel
90 %45 = OpFunctionCall %void %cross_041cb0
Ben Claytonc0af5c52022-06-02 14:36:10 +000091 OpReturn
92 OpFunctionEnd