| 8 | namespace kp { |
| 9 | namespace py { |
| 10 | static pybind11::dict |
| 11 | vkPropertiesToDict(const vk::PhysicalDeviceProperties& properties) |
| 12 | { |
| 13 | std::string deviceName = properties.deviceName; |
| 14 | pybind11::dict pyDict( |
| 15 | "device_name"_a = deviceName, |
| 16 | "max_work_group_count"_a = |
| 17 | pybind11::make_tuple(properties.limits.maxComputeWorkGroupCount[0], |
| 18 | properties.limits.maxComputeWorkGroupCount[1], |
| 19 | properties.limits.maxComputeWorkGroupCount[2]), |
| 20 | "max_work_group_invocations"_a = |
| 21 | properties.limits.maxComputeWorkGroupInvocations, |
| 22 | "max_work_group_size"_a = |
| 23 | pybind11::make_tuple(properties.limits.maxComputeWorkGroupSize[0], |
| 24 | properties.limits.maxComputeWorkGroupSize[1], |
| 25 | properties.limits.maxComputeWorkGroupSize[2]), |
| 26 | "timestamps_supported"_a = |
| 27 | (bool)properties.limits.timestampComputeAndGraphics); |
| 28 | |
| 29 | return pyDict; |
| 30 | } |
| 31 | } |
| 32 | } |