Device Properties
This commit is contained in:
parent
50366c6658
commit
f52efcef0f
5 changed files with 198 additions and 107 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue