| 108 | } |
| 109 | |
| 110 | static void hasProcAddress(CPU* cpu) { |
| 111 | U32 handle = cpu->peek32(1); |
| 112 | if (!handle) { |
| 113 | EAX = 1; |
| 114 | } else { |
| 115 | BoxedVulkanInfo* pBoxedInfo = getInfoFromHandle(cpu->memory, handle); |
| 116 | BString name = cpu->memory->readString(cpu->peek32(2)); |
| 117 | |
| 118 | if (name == "vkMapMemory2KHR" || name == "vkUnmapMemory2KHR") { |
| 119 | EAX = 0; |
| 120 | } else if (pBoxedInfo->functionAddressByName.count(name) || name == "vkGetDeviceProcAddr" || name == "vkCreateXlibSurfaceKHR") { |
| 121 | EAX = 1; |
| 122 | } |
| 123 | else { |
| 124 | EAX = 0; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | void freeVulkanPtr(KMemory* memory, U32 p) { |
| 130 | KProcessPtr process = KThread::currentThread()->process; |
nothing calls this directly
no test coverage detected