#include "./device.hpp" #include "./physical_device.hpp" using vk::device; /////////////////////////////////////////////////////////////////////////////// device::device (const physical_device &phys, const VkDeviceCreateInfo &info): instantiated (phys.id (), &info, nullptr) { ; } /////////////////////////////////////////////////////////////////////////////// VkPhysicalDeviceMemoryProperties device::physical_properties (void) const { VkPhysicalDeviceMemoryProperties props; vkGetPhysicalDeviceMemoryProperties (id (), &props); return props; } /////////////////////////////////////////////////////////////////////////////// void device::flush (const VkMappedMemoryRange *first, const VkMappedMemoryRange *last) { auto err = vkFlushMappedMemoryRanges (id (), last - first, first); error::try_code (err); } //----------------------------------------------------------------------------- void device::invalidate (const VkMappedMemoryRange *first, const VkMappedMemoryRange *last) { auto err = vkInvalidateMappedMemoryRanges (id (), last - first, first); error::try_code (err); }