mirror of
https://github.com/libretro/parallel-dc.git
synced 2026-11-11 23:42:41 -10:00
The frame's lists are ta_list.c's (C89): List<T> is a typed facade over it. A strip's indices are ta_index.c's C89 kernel: one branch-free check of the whole strip, then a straight run of indices; the per-vertex loop only where a vertex is bad or the room runs out. The parse is about 20% faster (2.74 to 2.17 ns a vertex on the heavy disc), its output the same byte for byte. With Vulkan on a machine whose video memory the CPU reads back fast (one memory, as lavapipe's and integrated GPUs'), the vertices and indices are parsed straight into a slice of memory the card reads, one slice a frame in flight (rend/parse_arena.h, vulkan/parse_arena_vk.h), and the translucent sort writes after them: no copy into the main buffer. Other machines copy as ever. Tests: tools/pvr/ta_index_test.sh (against the old loop, 1M strips), tools/rend/parse_arena_test.sh, tools/vulkan/vk_parse_arena.sh (every render in place, pictures those of the copy, each renderer, threaded, upscaler, a change of size), tools/pvr/ta_parse_bench.sh; vk_hdr gains VKH_UNCACHED, VKH_OPTS_AT and VKH_BUFFERS.