MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / get

Method get

vulkanDeviceInfo.cpp:30–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void VulkanSurfaceInfo::get(VkPhysicalDevice device, VkSurfaceKHR surface)
31{
32 if (!validSurface) {
33 return;
34 }
35 vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device, surface, &capabilities);
36 // Present modes
37 uint32_t presentModeCount;
38 if (vkGetPhysicalDeviceSurfacePresentModesKHR(device, surface, &presentModeCount, nullptr) == VK_SUCCESS)
39 {
40 presentModes.resize(presentModeCount);
41 if (presentModeCount > 0)
42 {
43 vkGetPhysicalDeviceSurfacePresentModesKHR(device, surface, &presentModeCount, presentModes.data());
44 }
45 }
46 // Surface formats
47 uint32_t surfaceFormatCount;
48 if (vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &surfaceFormatCount, nullptr) == VK_SUCCESS)
49 {
50 formats.resize(surfaceFormatCount);
51 if (surfaceFormatCount > 0)
52 {
53 vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &surfaceFormatCount, formats.data());
54 }
55 }
56}
57
58void VulkanDeviceInfo::readExtensions()
59{

Callers 3

checkServerConnectionMethod · 0.80
httpGetMethod · 0.80
readSurfaceInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected