From 15fa664d348ef0bb4c136275df26db6199babb2e Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 7 Sep 2017 12:51:00 +1000 Subject: [PATCH] physical_device: add memory_properties query --- physical_device.cpp | 15 +++++++++++---- physical_device.hpp | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/physical_device.cpp b/physical_device.cpp index e828e7c..58527da 100644 --- a/physical_device.cpp +++ b/physical_device.cpp @@ -63,12 +63,19 @@ physical_device::features (void) const VkSurfaceCapabilitiesKHR physical_device::surface_capabilities (VkSurfaceKHR surface) const { - VkSurfaceCapabilitiesKHR value; - error::try_func ( - &vkGetPhysicalDeviceSurfaceCapabilitiesKHR, id (), surface, &value + return error::try_query ( + vkGetPhysicalDeviceSurfaceCapabilitiesKHR, id (), surface ); +} - return value; + +//----------------------------------------------------------------------------- +VkPhysicalDeviceMemoryProperties +physical_device::memory_properties (void) const +{ + return error::try_query ( + vkGetPhysicalDeviceMemoryProperties, id () + ); } diff --git a/physical_device.hpp b/physical_device.hpp index f943022..65a29b6 100644 --- a/physical_device.hpp +++ b/physical_device.hpp @@ -34,6 +34,7 @@ namespace cruft::vk { VkPhysicalDeviceProperties properties (void) const; VkPhysicalDeviceFeatures features (void) const; VkSurfaceCapabilitiesKHR surface_capabilities (VkSurfaceKHR) const; + VkPhysicalDeviceMemoryProperties memory_properties (void) const; std::vector queue_families (void) const;