Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
dan sinclair | b42888c | 2023-12-05 17:05:25 +0000 | [diff] [blame] | 4 | ; Bound: 20 |
Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
dan sinclair | b42888c | 2023-12-05 17:05:25 +0000 | [diff] [blame] | 8 | OpEntryPoint GLCompute %f "f" |
| 9 | OpExecutionMode %f LocalSize 1 1 1 |
| 10 | OpName %s_block "s_block" |
| 11 | OpMemberName %s_block 0 "inner" |
| 12 | OpName %s "s" |
Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 13 | OpName %f "f" |
| 14 | OpName %c "c" |
| 15 | OpName %d "d" |
dan sinclair | b42888c | 2023-12-05 17:05:25 +0000 | [diff] [blame] | 16 | OpDecorate %s_block Block |
| 17 | OpMemberDecorate %s_block 0 Offset 0 |
| 18 | OpDecorate %s DescriptorSet 0 |
| 19 | OpDecorate %s Binding 0 |
Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 20 | %int = OpTypeInt 32 1 |
dan sinclair | b42888c | 2023-12-05 17:05:25 +0000 | [diff] [blame] | 21 | %s_block = OpTypeStruct %int |
| 22 | %_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block |
| 23 | %s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer |
| 24 | %void = OpTypeVoid |
| 25 | %5 = OpTypeFunction %void |
Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 26 | %_ptr_Function_int = OpTypePointer Function %int |
dan sinclair | b42888c | 2023-12-05 17:05:25 +0000 | [diff] [blame] | 27 | %11 = OpConstantNull %int |
| 28 | %uint = OpTypeInt 32 0 |
| 29 | %uint_0 = OpConstant %uint 0 |
| 30 | %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| 31 | %f = OpFunction %void None %5 |
| 32 | %8 = OpLabel |
| 33 | %c = OpVariable %_ptr_Function_int Function %11 |
| 34 | %d = OpVariable %_ptr_Function_int Function %11 |
| 35 | %16 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 |
| 36 | %17 = OpLoad %int %c |
| 37 | %18 = OpLoad %int %d |
| 38 | %19 = OpIAdd %int %17 %18 |
| 39 | OpStore %16 %19 |
Ben Clayton | 177e7bf | 2021-11-22 15:24:16 +0000 | [diff] [blame] | 40 | OpReturn |
| 41 | OpFunctionEnd |