MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / intercept_core_device_command

Function intercept_core_device_command

layersvt/screenshot.cpp:1846–1862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1844}
1845
1846static PFN_vkVoidFunction intercept_core_device_command(const char *name) {
1847 static const struct {
1848 const char *name;
1849 PFN_vkVoidFunction proc;
1850 } core_device_commands[] = {
1851 {"vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(GetDeviceProcAddr)},
1852 {"vkGetDeviceQueue", reinterpret_cast<PFN_vkVoidFunction>(GetDeviceQueue)},
1853 {"vkGetDeviceQueue2", reinterpret_cast<PFN_vkVoidFunction>(GetDeviceQueue2)},
1854 {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice)},
1855 };
1856
1857 for (size_t i = 0; i < ARRAY_SIZE(core_device_commands); i++) {
1858 if (!strcmp(core_device_commands[i].name, name)) return core_device_commands[i].proc;
1859 }
1860
1861 return nullptr;
1862}
1863
1864static PFN_vkVoidFunction intercept_khr_swapchain_command(const char *name, VkDevice dev) {
1865 static const struct {

Callers 2

GetDeviceProcAddrFunction · 0.85
GetInstanceProcAddrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected