nanovg_vulkan/tests/README.md
Шурупов Илья Викторович 1a08593e46 Fix Vulkan buffer growth across allocation padding
2026-11-17 21:03:22 +03:00

571 B

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