dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 1 |
| 4 | ; Bound: 24 |
| 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 9 | OpExecutionMode %fragment_main OriginUpperLeft |
| 10 | OpMemberName %tint_symbol_1 0 "tint_symbol" |
| 11 | OpName %tint_symbol_1 "tint_symbol_1" |
| 12 | OpName %fwidth_b83ebb "fwidth_b83ebb" |
| 13 | OpName %res "res" |
| 14 | OpName %fragment_main "fragment_main" |
| 15 | OpMemberDecorate %tint_symbol_1 0 Offset 0 |
| 16 | OpDecorate %tint_symbol_1 Block |
| 17 | OpDecorate %1 DescriptorSet 0 |
| 18 | OpDecorate %1 Binding 0 |
| 19 | %float = OpTypeFloat 32 |
| 20 | %v2float = OpTypeVector %float 2 |
| 21 | %tint_symbol_1 = OpTypeStruct %v2float |
| 22 | %_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1 |
| 23 | %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer |
| 24 | %7 = OpTypeFunction %v2float |
| 25 | %float_1 = OpConstant %float 1 |
| 26 | %10 = OpConstantComposite %v2float %float_1 %float_1 |
| 27 | %_ptr_Function_v2float = OpTypePointer Function %v2float |
| 28 | %void = OpTypeVoid |
| 29 | %17 = OpTypeFunction %void |
| 30 | %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float |
| 31 | %uint = OpTypeInt 32 0 |
| 32 | %uint_0 = OpConstant %uint 0 |
| 33 | %fwidth_b83ebb = OpFunction %v2float None %7 |
| 34 | %8 = OpLabel |
| 35 | %res = OpVariable %_ptr_Function_v2float Function |
| 36 | %9 = OpFwidth %v2float %10 |
| 37 | OpStore %res %9 |
| 38 | %14 = OpLoad %v2float %res |
| 39 | OpReturnValue %14 |
| 40 | OpFunctionEnd |
| 41 | %fragment_main = OpFunction %void None %17 |
| 42 | %18 = OpLabel |
| 43 | %19 = OpFunctionCall %v2float %fwidth_b83ebb |
| 44 | %20 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0 |
| 45 | OpStore %20 %19 |
| 46 | OpReturn |
| 47 | OpFunctionEnd |