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:
Niklas Haas
2017-09-27 17:08:06 +02:00
committed by Martin Herkt
parent ad50e640dc
commit 4e34615872
6 changed files with 190 additions and 195 deletions

View File

@@ -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))