| 320 | } |
| 321 | |
| 322 | void vk_EnumerateInstanceExtensionProperties(CPU* cpu) { |
| 323 | initVulkan(); |
| 324 | U32 len = 0; |
| 325 | char* pLayerName = nullptr; |
| 326 | if (ARG1) { |
| 327 | len = cpu->memory->strlen(ARG1); |
| 328 | pLayerName = new char[len]; |
| 329 | cpu->memory->memcpy(pLayerName, ARG1, (U32)len * sizeof(char)); |
| 330 | } |
| 331 | uint32_t tmp_pPropertyCount = (uint32_t)cpu->memory->readd(ARG2); |
| 332 | uint32_t* pPropertyCount = &tmp_pPropertyCount; |
| 333 | VkExtensionProperties* pProperties = nullptr; |
| 334 | if (ARG3) { |
| 335 | pProperties = new VkExtensionProperties[*pPropertyCount]; |
| 336 | cpu->memory->memcpy(pProperties, ARG3, (U32)*pPropertyCount * sizeof(VkExtensionProperties)); |
| 337 | } |
| 338 | EAX = pvkEnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties); |
| 339 | delete[] pLayerName; |
| 340 | cpu->memory->writed(ARG2, (U32)tmp_pPropertyCount); |
| 341 | if (pProperties) { |
| 342 | for (U32 i = 0; i < tmp_pPropertyCount; i++) { |
| 343 | if (!strcmp(pProperties[i].extensionName, "VK_MVK_macos_surface") || !strcmp(pProperties[i].extensionName, "VK_EXT_metal_surface") || !strcmp(pProperties[i].extensionName, "VK_KHR_win32_surface")) { |
| 344 | strcpy(pProperties[i].extensionName, "VK_KHR_xlib_surface"); |
| 345 | } |
| 346 | } |
| 347 | cpu->memory->memcpy(ARG3, pProperties, (U32)*pPropertyCount * sizeof(VkExtensionProperties)); |
| 348 | } |
| 349 | delete[] pProperties; |
| 350 | } |
| 351 | |
| 352 | VkBool32 VKAPI_PTR boxed_vkDebugReportCallbackEXT(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) { |
| 353 | if (pMessage) { |
nothing calls this directly
no test coverage detected