Returns the number of instruction words taken up by a memory access argument and its implied operands.
| 240 | // Returns the number of instruction words taken up by a memory access |
| 241 | // argument and its implied operands. |
| 242 | int MemoryAccessNumWords(uint32_t mask) { |
| 243 | int result = 1; // Count the mask |
| 244 | if (mask & uint32_t(spv::MemoryAccessMask::Aligned)) ++result; |
| 245 | if (mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)) ++result; |
| 246 | if (mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)) ++result; |
| 247 | return result; |
| 248 | } |
| 249 | |
| 250 | // Returns the scope ID operand for MakeAvailable memory access with mask |
| 251 | // at the given operand index. |
no outgoing calls
no test coverage detected