Returns the scope ID operand for MakeAvailable memory access with mask at the given operand index. This function is only called for OpLoad, OpStore, OpCopyMemory and OpCopyMemorySized, OpCooperativeMatrixLoadNV, OpCooperativeMatrixStoreNV, OpCooperativeVectorLoadNV, OpCooperativeVectorStoreNV.
| 254 | // OpCooperativeMatrixStoreNV, OpCooperativeVectorLoadNV, |
| 255 | // OpCooperativeVectorStoreNV. |
| 256 | uint32_t GetMakeAvailableScope(const Instruction* inst, uint32_t mask, |
| 257 | uint32_t mask_index) { |
| 258 | assert(mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)); |
| 259 | uint32_t this_bit = uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR); |
| 260 | uint32_t index = |
| 261 | mask_index - 1 + MemoryAccessNumWords(mask & (this_bit | (this_bit - 1))); |
| 262 | return inst->GetOperandAs<uint32_t>(index); |
| 263 | } |
| 264 | |
| 265 | // This function is only called for OpLoad, OpStore, OpCopyMemory, |
| 266 | // OpCopyMemorySized, OpCooperativeMatrixLoadNV, |
no test coverage detected