raw vk::deviceproperties and python dict

This commit is contained in:
alexander-g 2021-03-12 09:51:31 +01:00
parent f52efcef0f
commit d71d169886
5 changed files with 24 additions and 65 deletions

View file

@ -447,17 +447,10 @@ Manager::sequence(uint32_t queueIndex, uint32_t totalTimestamps)
return sq;
}
DeviceProperties Manager::getDeviceProperties() const
vk::PhysicalDeviceProperties
Manager::getDeviceProperties() const
{
const vk::PhysicalDeviceProperties properties = this->mPhysicalDevice->getProperties();
const DeviceProperties output{
std::string(properties.deviceName.data()),
properties.limits.maxComputeWorkGroupCount,
properties.limits.maxComputeWorkGroupInvocations,
properties.limits.maxComputeWorkGroupSize,
properties.limits.timestampComputeAndGraphics,
};
return output;
return this->mPhysicalDevice->getProperties();
}
}

View file

@ -11,23 +11,6 @@
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
*/
@ -173,7 +156,7 @@ class Manager
/**
* Return a struct containing information about the device.
**/
DeviceProperties getDeviceProperties() const;
vk::PhysicalDeviceProperties getDeviceProperties() const;
private:
// -------------- OPTIONALLY OWNED RESOURCES
@ -207,5 +190,4 @@ class Manager
const std::vector<std::string>& desiredExtensions = {});
};
} // End namespace kp