diff options
| author | Charles Giessen <charles@lunarg.com> | 2024-01-12 12:19:32 -0600 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2024-01-12 12:04:17 -0700 |
| commit | e156996c478a8e5d040ccf199437bcdbdbab63ed (patch) | |
| tree | 4652ec12f3b78b73d31662f14dff1c73ef58503d /vulkaninfo/vulkaninfo.cpp | |
| parent | af30c3316de1fa717b8615afebcfb9339e43ed2d (diff) | |
| download | usermoji-e156996c478a8e5d040ccf199437bcdbdbab63ed.tar.xz | |
vulkaninfo: Use volk for function loading
Make use of the volk library to fascilitate function loading.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 2c83c4c9..3d57f634 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -194,8 +194,7 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf surface_caps2.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR; surface_caps2.pNext = &SurfacePresentScalingCapabilitiesEXT; - VkResult err = - inst.ext_funcs.vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); + VkResult err = vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); if (err != VK_SUCCESS) { continue; } @@ -203,7 +202,7 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf std::vector<VkPresentModeKHR> compatible_present_modes{SurfacePresentModeCompatibilityEXT.presentModeCount}; SurfacePresentModeCompatibilityEXT.pPresentModes = compatible_present_modes.data(); - err = inst.ext_funcs.vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); + err = vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); if (err == VK_SUCCESS) { ObjectWrapper present_mode_obj(p, VkPresentModeKHRString(mode)); @@ -355,12 +354,12 @@ void GetAndDumpHostImageCopyPropertiesEXT(Printer &p, AppGpu &gpu) { VkPhysicalDeviceProperties2KHR props2{}; props2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; props2.pNext = static_cast<void *>(&host_image_copy_properties_ext); - gpu.inst.ext_funcs.vkGetPhysicalDeviceProperties2KHR(gpu.phys_device, &props2); + vkGetPhysicalDeviceProperties2KHR(gpu.phys_device, &props2); std::vector<VkImageLayout> src_layouts(host_image_copy_properties_ext.copySrcLayoutCount); host_image_copy_properties_ext.pCopySrcLayouts = src_layouts.data(); std::vector<VkImageLayout> dst_layouts(host_image_copy_properties_ext.copyDstLayoutCount); host_image_copy_properties_ext.pCopyDstLayouts = dst_layouts.data(); - gpu.inst.ext_funcs.vkGetPhysicalDeviceProperties2KHR(gpu.phys_device, &props2); + vkGetPhysicalDeviceProperties2KHR(gpu.phys_device, &props2); DumpVkPhysicalDeviceHostImageCopyPropertiesEXT(p, "VkPhysicalDeviceHostImageCopyPropertiesEXT", host_image_copy_properties_ext); } @@ -722,7 +721,7 @@ void DumpGpuProfileCapabilities(Printer &p, AppGpu &gpu) { format_props2.formatProperties = formats.props; std::unique_ptr<format_properties2_chain> chain_for_format_props2; setup_format_properties2_chain(format_props2, chain_for_format_props2, gpu); - gpu.inst.ext_funcs.vkGetPhysicalDeviceFormatProperties2KHR(gpu.phys_device, fmt, &format_props2); + vkGetPhysicalDeviceFormatProperties2KHR(gpu.phys_device, fmt, &format_props2); chain_iterator_format_properties2(p, gpu, format_props2.pNext); } already_printed_formats.insert(fmt); @@ -1191,8 +1190,7 @@ int main(int argc, char **argv) { try { // check if the surface is supported by the physical device before adding it to the list VkBool32 supported = VK_FALSE; - VkResult err = instance.ext_funcs.vkGetPhysicalDeviceSurfaceSupportKHR(gpu->phys_device, 0, - surface_extension.surface, &supported); + VkResult err = vkGetPhysicalDeviceSurfaceSupportKHR(gpu->phys_device, 0, surface_extension.surface, &supported); if (err != VK_SUCCESS || supported == VK_FALSE) continue; surfaces.push_back( |
