diff --git a/ostream.cpp b/ostream.cpp index 0df127c..f51861d 100644 --- a/ostream.cpp +++ b/ostream.cpp @@ -24,6 +24,22 @@ #include +/////////////////////////////////////////////////////////////////////////////// +std::ostream& +operator<< (std::ostream &os, VkExtent2D val) +{ + return os << "[ " << val.width << ", " << val.height << " ]"; +} + + +//----------------------------------------------------------------------------- +std::ostream& +operator<< (std::ostream &os, VkExtent3D val) +{ + return os << "[ " << val.width << ", " << val.height << ", " << val.depth << "]"; +} + + /////////////////////////////////////////////////////////////////////////////// static std::ostream& @@ -129,8 +145,26 @@ cruft::vk::operator<< (std::ostream &os, const physical_device &d) os << " ], "; os << " properties: " << d.properties () - << ", features: " << d.features () - << " }"; + << ", features: " << d.features (); - return os; -} \ No newline at end of file + os << ", queues: "; + const auto &queues = d.queue_families (); + std::copy ( + std::cbegin (queues), + std::cend (queues), + util::infix_iterator (os, ", ") + ); + + return os << "}"; +} + + +/////////////////////////////////////////////////////////////////////////////// +std::ostream& +operator<< (std::ostream &os, const VkQueueFamilyProperties &val) +{ + return os << "{ flags: " << val.queueFlags + << ", count: " << val.queueCount + << ", granularity: " << val.minImageTransferGranularity + << " }"; +}; diff --git a/ostream.hpp b/ostream.hpp index fff9348..f86b568 100644 --- a/ostream.hpp +++ b/ostream.hpp @@ -27,7 +27,13 @@ /////////////////////////////////////////////////////////////////////////////// +std::ostream& operator<< (std::ostream&, VkExtent2D); +std::ostream& operator<< (std::ostream&, VkExtent3D); std::ostream& operator<< (std::ostream&, VkPhysicalDeviceType); + + +/////////////////////////////////////////////////////////////////////////////// +std::ostream& operator<< (std::ostream&, const VkQueueFamilyProperties&); std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceLimits&); std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceProperties&);