Mercurial > games > semicongine
comparison tests/test_rendering.nim @ 1211:d9799f74f5a7 compiletime-tests
did: cleanup and enable all tests
author | sam <sam@basx.dev> |
---|---|
date | Wed, 17 Jul 2024 00:33:32 +0700 |
parents | 570ac1620fb6 |
children | 518a952eccbf |
comparison
equal
deleted
inserted
replaced
1210:570ac1620fb6 | 1211:d9799f74f5a7 |
---|---|
313 checkVkResult vkDeviceWaitIdle(vulkan.device) | 313 checkVkResult vkDeviceWaitIdle(vulkan.device) |
314 DestroyPipeline(pipeline) | 314 DestroyPipeline(pipeline) |
315 DestroyRenderData(renderdata) | 315 DestroyRenderData(renderdata) |
316 | 316 |
317 when isMainModule: | 317 when isMainModule: |
318 var nFrames = 5000 | 318 var nFrames = 2000 |
319 InitVulkan() | 319 InitVulkan() |
320 | 320 |
321 # test normal | 321 # test normal |
322 block: | 322 block: |
323 mainRenderpass = CreatePresentationRenderPass() | 323 mainRenderpass = CreatePresentationRenderPass() |
324 swapchain = InitSwapchain(renderpass = mainRenderpass).get() | 324 swapchain = InitSwapchain(renderpass = mainRenderpass).get() |
325 | 325 |
326 # tests a simple triangle with minimalistic shader and vertex format | 326 # tests a simple triangle with minimalistic shader and vertex format |
327 # test_01_triangle(nFrames) | 327 test_01_triangle(nFrames) |
328 | 328 |
329 # tests instanced triangles and quads, mixing meshes and instances | 329 # tests instanced triangles and quads, mixing meshes and instances |
330 # test_02_triangle_quad_instanced(nFrames) | 330 test_02_triangle_quad_instanced(nFrames) |
331 | 331 |
332 # test_03_simple_descriptorset(nFrames) | 332 # teste descriptor sets |
333 | 333 test_03_simple_descriptorset(nFrames) |
334 # tests | 334 |
335 # tests multiple descriptor sets and arrays | |
335 test_04_multiple_descriptorsets(nFrames) | 336 test_04_multiple_descriptorsets(nFrames) |
336 | 337 |
337 checkVkResult vkDeviceWaitIdle(vulkan.device) | 338 checkVkResult vkDeviceWaitIdle(vulkan.device) |
338 vkDestroyRenderPass(vulkan.device, mainRenderpass, nil) | 339 vkDestroyRenderPass(vulkan.device, mainRenderpass, nil) |
339 DestroySwapchain(swapchain) | 340 DestroySwapchain(swapchain) |
341 # test MSAA | 342 # test MSAA |
342 block: | 343 block: |
343 mainRenderpass = CreatePresentationRenderPass(samples = VK_SAMPLE_COUNT_4_BIT) | 344 mainRenderpass = CreatePresentationRenderPass(samples = VK_SAMPLE_COUNT_4_BIT) |
344 swapchain = InitSwapchain(renderpass = mainRenderpass, samples = VK_SAMPLE_COUNT_4_BIT).get() | 345 swapchain = InitSwapchain(renderpass = mainRenderpass, samples = VK_SAMPLE_COUNT_4_BIT).get() |
345 | 346 |
346 # test_01_triangle(99999999) | 347 test_01_triangle(99999999) |
347 | 348 |
348 checkVkResult vkDeviceWaitIdle(vulkan.device) | 349 checkVkResult vkDeviceWaitIdle(vulkan.device) |
349 vkDestroyRenderPass(vulkan.device, mainRenderpass, nil) | 350 vkDestroyRenderPass(vulkan.device, mainRenderpass, nil) |
350 DestroySwapchain(swapchain) | 351 DestroySwapchain(swapchain) |
351 | 352 |