Device Properties

This commit is contained in:
alexander-g 2021-03-12 08:32:51 +01:00
parent 50366c6658
commit f52efcef0f
5 changed files with 198 additions and 107 deletions

View file

@ -11,6 +11,23 @@
namespace kp {
struct DeviceProperties
{
//Name of the device
const std::string deviceName;
//Maximum number of workgroups that can be dispatched per shader
const std::array<uint32_t,3> maxWorkGroupCount;
//Maximum number of shader invocations per local workgroup
//i.e. the product of maxWorkGroupSize must not exceed this value
const uint32_t maxWorkGroupInvocations;
//Maximum number of shader invocations per local workgroup
const std::array<uint32_t,3> maxWorkGroupSize;
//Whether timestamping is supported by this device or not
const bool timestampsSupported;
};
/**
Base orchestrator which creates and manages device and child components
*/
@ -153,6 +170,11 @@ class Manager
**/
void clear();
/**
* Return a struct containing information about the device.
**/
DeviceProperties getDeviceProperties() const;
private:
// -------------- OPTIONALLY OWNED RESOURCES
std::shared_ptr<vk::Instance> mInstance = nullptr;
@ -185,4 +207,5 @@ class Manager
const std::vector<std::string>& desiredExtensions = {});
};
} // End namespace kp