| 193 | } |
| 194 | |
| 195 | void unmapVkMemory(VkDeviceMemory memory) { |
| 196 | BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(vmemoryMutex); |
| 197 | std::shared_ptr<VMemory> m = getVMemory(memory); |
| 198 | if (!m) { |
| 199 | kpanic("Wasn't expecting mapVkMemory before registerVkMemoryAllocation"); |
| 200 | } |
| 201 | if (!m->mappedAddress) { |
| 202 | klog("unmapVkMemory called, but no record of being mapped"); |
| 203 | } |
| 204 | KThread::currentThread()->memory->unmapNativeMemory(m->mappedAddress, (U32)m->mappedLen); |
| 205 | m->mappedAddress = 0; |
| 206 | m->mappedLen = 0; |
| 207 | } |
| 208 | |
| 209 | #define ARG1 cpu->peek32(1) |
| 210 | #define ARG2 cpu->peek32(2) |
no test coverage detected