| 965 | return result; |
| 966 | } |
| 967 | VkResult VKAPI_CALL vkBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo *pBindInfos) |
| 968 | { |
| 969 | reshade::vulkan::device_impl *const device_impl = g_vulkan_devices.at(dispatch_key_from_handle(device)); |
| 970 | RESHADE_VULKAN_GET_DEVICE_DISPATCH_PTR(BindImageMemory2, device_impl); |
| 971 | |
| 972 | const VkResult result = trampoline(device, bindInfoCount, pBindInfos); |
| 973 | if (result < VK_SUCCESS) |
| 974 | { |
| 975 | #if RESHADE_VERBOSE_LOG |
| 976 | reshade::log::message(reshade::log::level::warning, "vkBindImageMemory2 failed with error code %d.", static_cast<int>(result)); |
| 977 | #endif |
| 978 | return result; |
| 979 | } |
| 980 | |
| 981 | #if RESHADE_ADDON |
| 982 | for (uint32_t i = 0; i < bindInfoCount; ++i) |
| 983 | { |
| 984 | const auto image_data = device_impl->get_private_data_for_object<VK_OBJECT_TYPE_IMAGE>(pBindInfos[i].image); |
| 985 | image_data->memory = pBindInfos[i].memory; |
| 986 | image_data->memory_offset = pBindInfos[i].memoryOffset; |
| 987 | |
| 988 | reshade::invoke_addon_event<reshade::addon_event::init_resource>( |
| 989 | device_impl, |
| 990 | reshade::vulkan::convert_resource_desc(image_data->create_info), |
| 991 | nullptr, |
| 992 | image_data->create_info.initialLayout == VK_IMAGE_LAYOUT_PREINITIALIZED ? reshade::api::resource_usage::cpu_access : reshade::api::resource_usage::undefined, |
| 993 | reshade::api::resource { (uint64_t)pBindInfos[i].image }); |
| 994 | |
| 995 | create_default_view(device_impl, pBindInfos[i].image); |
| 996 | } |
| 997 | #endif |
| 998 | |
| 999 | return result; |
| 1000 | } |
| 1001 | |
| 1002 | VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool) |
| 1003 | { |
nothing calls this directly
no test coverage detected