physical_device: add memory_properties query

This commit is contained in:
Danny Robson 2017-09-07 12:51:00 +10:00
parent b1cf5a7c2a
commit 15fa664d34
2 changed files with 12 additions and 4 deletions

View File

@ -63,12 +63,19 @@ physical_device::features (void) const
VkSurfaceCapabilitiesKHR VkSurfaceCapabilitiesKHR
physical_device::surface_capabilities (VkSurfaceKHR surface) const physical_device::surface_capabilities (VkSurfaceKHR surface) const
{ {
VkSurfaceCapabilitiesKHR value; return error::try_query (
error::try_func ( vkGetPhysicalDeviceSurfaceCapabilitiesKHR, id (), surface
&vkGetPhysicalDeviceSurfaceCapabilitiesKHR, id (), surface, &value
); );
}
return value;
//-----------------------------------------------------------------------------
VkPhysicalDeviceMemoryProperties
physical_device::memory_properties (void) const
{
return error::try_query (
vkGetPhysicalDeviceMemoryProperties, id ()
);
} }

View File

@ -34,6 +34,7 @@ namespace cruft::vk {
VkPhysicalDeviceProperties properties (void) const; VkPhysicalDeviceProperties properties (void) const;
VkPhysicalDeviceFeatures features (void) const; VkPhysicalDeviceFeatures features (void) const;
VkSurfaceCapabilitiesKHR surface_capabilities (VkSurfaceKHR) const; VkSurfaceCapabilitiesKHR surface_capabilities (VkSurfaceKHR) const;
VkPhysicalDeviceMemoryProperties memory_properties (void) const;
std::vector<VkQueueFamilyProperties> queue_families (void) const; std::vector<VkQueueFamilyProperties> queue_families (void) const;