nanovg_vulkan/tests
Шурупов Илья Викторович 1a08593e46 Fix Vulkan buffer growth across allocation padding
2026-11-17 21:03:22 +03:00
..
buffer_growth.c Fix Vulkan buffer growth across allocation padding 2026-11-17 21:03:22 +03:00
README.md Fix Vulkan buffer growth across allocation padding 2026-11-17 21:03:22 +03:00
texture_slots.c Add a CPU-only test for texture slot bookkeeping 2026-10-28 00:59:32 +03:00

Backend unit tests

texture_slots.c checks the Vulkan backend's bookkeeping without a GPU or Vulkan device. It includes nanovg_vk.c and drives its internal functions with fake handles.

cc -std=c99 -Isrc tests/texture_slots.c src/nanovg.c -lvulkan -lm -o texture_slots
./texture_slots

buffer_growth.c creates a Vulkan device and checks that buffer reuse uses the declared buffer capacity rather than the padded device memory allocation size.

cc -std=c99 -Isrc tests/buffer_growth.c src/nanovg.c -lvulkan -lm -o buffer_growth
./buffer_growth