mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-22 10:57:08 +00:00
vo_gpu: vulkan: refactor vk_cmdpool
1. No more static arrays (deps / callbacks / queues / cmds) 2. Allows safely recording multiple commands at the same time 3. Uses resources optimally by never over-allocating commands
This commit is contained in:
committed by
Martin Herkt
parent
ad50e640dc
commit
4e34615872
@@ -124,6 +124,13 @@ char *ta_talloc_asprintf_append_buffer(char *s, const char *fmt, ...) TA_PRF(2,
|
||||
(idxvar)--; \
|
||||
} while (0)
|
||||
|
||||
// Returns whether or not there was any element to pop.
|
||||
#define MP_TARRAY_POP(p, idxvar, out) \
|
||||
((idxvar) > 0 \
|
||||
? (*(out) = (p)[--(idxvar)], true) \
|
||||
: false \
|
||||
)
|
||||
|
||||
#define talloc_struct(ctx, type, ...) \
|
||||
talloc_memdup(ctx, &(type) TA_EXPAND_ARGS(__VA_ARGS__), sizeof(type))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user