Mercurial > games > semicongine
annotate svk/test.nim @ 1500:91c8c3b7cbf0
add: futhark tests for generating vulkan api
| author | sam <sam@basx.dev> |
|---|---|
| date | Wed, 26 Nov 2025 21:36:48 +0700 |
| parents | 81da4be50663 |
| children |
| rev | line source |
|---|---|
| 1485 | 1 import ./api |
| 1484 | 2 |
| 1489 | 3 var vk = svkCreateInstance("test") |
| 1485 | 4 echo vk |
| 1490 | 5 var pdev: SVkPhysicalDevice |
| 1489 | 6 for d in vk.getUsablePhysicalDevices(): |
| 7 echo d.name, " queue familye: ", d.queueFamily | |
| 8 echo "memory types:" | |
| 9 for mt in d.memoryTypes: | |
| 10 echo " ", mt | |
| 11 echo "" | |
| 1490 | 12 pdev = d |
| 13 if d.discreteGPU: | |
| 14 break | |
| 1489 | 15 |
| 1490 | 16 var dev = vk.svkCreateDevice(pdev) |
| 17 | |
| 18 dev.destroy() | |
| 1489 | 19 vk.destroy() |
