ostream: add queue_families to physical_device
This commit is contained in:
parent
7163123b71
commit
2a61e8c4ea
40
ostream.cpp
40
ostream.cpp
@ -24,6 +24,22 @@
|
|||||||
#include <cruft/util/iterator.hpp>
|
#include <cruft/util/iterator.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
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
|
static
|
||||||
std::ostream&
|
std::ostream&
|
||||||
@ -129,8 +145,26 @@ cruft::vk::operator<< (std::ostream &os, const physical_device &d)
|
|||||||
os << " ], ";
|
os << " ], ";
|
||||||
|
|
||||||
os << " properties: " << d.properties ()
|
os << " properties: " << d.properties ()
|
||||||
<< ", features: " << d.features ()
|
<< ", features: " << d.features ();
|
||||||
<< " }";
|
|
||||||
|
|
||||||
return os;
|
os << ", queues: ";
|
||||||
|
const auto &queues = d.queue_families ();
|
||||||
|
std::copy (
|
||||||
|
std::cbegin (queues),
|
||||||
|
std::cend (queues),
|
||||||
|
util::infix_iterator<VkQueueFamilyProperties> (os, ", ")
|
||||||
|
);
|
||||||
|
|
||||||
|
return os << "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
std::ostream&
|
||||||
|
operator<< (std::ostream &os, const VkQueueFamilyProperties &val)
|
||||||
|
{
|
||||||
|
return os << "{ flags: " << val.queueFlags
|
||||||
|
<< ", count: " << val.queueCount
|
||||||
|
<< ", granularity: " << val.minImageTransferGranularity
|
||||||
|
<< " }";
|
||||||
|
};
|
||||||
|
@ -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&, VkPhysicalDeviceType);
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
std::ostream& operator<< (std::ostream&, const VkQueueFamilyProperties&);
|
||||||
std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceLimits&);
|
std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceLimits&);
|
||||||
std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceProperties&);
|
std::ostream& operator<< (std::ostream&, const VkPhysicalDeviceProperties&);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user