blob: 062d6959f6a7a5ab8bd22328faadbec3fc15dc27 [file] [log] [blame]
dan sinclair1b77b6c2024-08-06 15:47:05 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 50
5; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint Fragment %fragment_main "fragment_main"
9 OpEntryPoint GLCompute %compute_main "compute_main"
10 OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output
11 OpExecutionMode %fragment_main OriginUpperLeft
12 OpExecutionMode %compute_main LocalSize 1 1 1
13 OpMemberName %tint_symbol_1 0 "tint_symbol"
14 OpName %tint_symbol_1 "tint_symbol_1"
15 OpName %vertex_main_position_Output "vertex_main_position_Output"
16 OpName %vertex_main_loc0_Output "vertex_main_loc0_Output"
17 OpName %vertex_main___point_size_Output "vertex_main___point_size_Output"
18 OpName %sqrt_20c74e "sqrt_20c74e"
19 OpName %res "res"
20 OpName %fragment_main "fragment_main"
21 OpName %compute_main "compute_main"
22 OpName %vertex_main_inner "vertex_main_inner"
23 OpMemberName %VertexOutput 0 "pos"
24 OpMemberName %VertexOutput 1 "prevent_dce"
25 OpName %VertexOutput "VertexOutput"
26 OpName %out "out"
27 OpName %vertex_main "vertex_main"
28 OpMemberDecorate %tint_symbol_1 0 Offset 0
29 OpDecorate %tint_symbol_1 Block
30 OpDecorate %1 DescriptorSet 0
31 OpDecorate %1 Binding 0
dan sinclaird117d652024-08-21 01:20:00 +000032 OpDecorate %1 Coherent
dan sinclair1b77b6c2024-08-06 15:47:05 +000033 OpDecorate %vertex_main_position_Output BuiltIn Position
34 OpDecorate %vertex_main_loc0_Output Location 0
35 OpDecorate %vertex_main_loc0_Output Flat
36 OpDecorate %vertex_main___point_size_Output BuiltIn PointSize
37 OpMemberDecorate %VertexOutput 0 Offset 0
38 OpMemberDecorate %VertexOutput 1 Offset 16
39 %float = OpTypeFloat 32
40%tint_symbol_1 = OpTypeStruct %float
41%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
42 %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
43 %v4float = OpTypeVector %float 4
44%_ptr_Output_v4float = OpTypePointer Output %v4float
45%vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output
46%_ptr_Output_float = OpTypePointer Output %float
47%vertex_main_loc0_Output = OpVariable %_ptr_Output_float Output
48%vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output
49 %12 = OpTypeFunction %float
50%_ptr_Function_float = OpTypePointer Function %float
51 %float_1 = OpConstant %float 1
52 %void = OpTypeVoid
53 %20 = OpTypeFunction %void
54%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
55 %uint = OpTypeInt 32 0
56 %uint_0 = OpConstant %uint 0
57%VertexOutput = OpTypeStruct %v4float %float
58 %33 = OpTypeFunction %VertexOutput
59%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
60 %37 = OpConstantNull %VertexOutput
61%_ptr_Function_v4float = OpTypePointer Function %v4float
62 %40 = OpConstantNull %v4float
63 %uint_1 = OpConstant %uint 1
64%sqrt_20c74e = OpFunction %float None %12
65 %13 = OpLabel
66 %res = OpVariable %_ptr_Function_float Function
67 OpStore %res %float_1
dan sinclair50260412024-08-28 19:43:27 +000068 %17 = OpLoad %float %res None
dan sinclair1b77b6c2024-08-06 15:47:05 +000069 OpReturnValue %17
70 OpFunctionEnd
71%fragment_main = OpFunction %void None %20
72 %21 = OpLabel
73 %22 = OpFunctionCall %float %sqrt_20c74e
74 %23 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000075 OpStore %23 %22 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000076 OpReturn
77 OpFunctionEnd
78%compute_main = OpFunction %void None %20
79 %28 = OpLabel
80 %29 = OpFunctionCall %float %sqrt_20c74e
81 %30 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000082 OpStore %30 %29 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000083 OpReturn
84 OpFunctionEnd
85%vertex_main_inner = OpFunction %VertexOutput None %33
86 %34 = OpLabel
87 %out = OpVariable %_ptr_Function_VertexOutput Function %37
88 %38 = OpAccessChain %_ptr_Function_v4float %out %uint_0
dan sinclair50260412024-08-28 19:43:27 +000089 OpStore %38 %40 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000090 %41 = OpAccessChain %_ptr_Function_float %out %uint_1
91 %43 = OpFunctionCall %float %sqrt_20c74e
dan sinclair50260412024-08-28 19:43:27 +000092 OpStore %41 %43 None
93 %44 = OpLoad %VertexOutput %out None
dan sinclair1b77b6c2024-08-06 15:47:05 +000094 OpReturnValue %44
95 OpFunctionEnd
96%vertex_main = OpFunction %void None %20
97 %46 = OpLabel
98 %47 = OpFunctionCall %VertexOutput %vertex_main_inner
99 %48 = OpCompositeExtract %v4float %47 0
dan sinclair50260412024-08-28 19:43:27 +0000100 OpStore %vertex_main_position_Output %48 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000101 %49 = OpCompositeExtract %float %47 1
dan sinclair50260412024-08-28 19:43:27 +0000102 OpStore %vertex_main_loc0_Output %49 None
103 OpStore %vertex_main___point_size_Output %float_1 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000104 OpReturn
105 OpFunctionEnd