Hi Hans-Kristian,
From a cursory look, most of this seems fine, but see what Chip said
about e.g. vkd3d_log2i(). Could you please split this into individual patches though? Both in order to make it more reviewable and to get more useful bisects. Wrt. the pthread wrappers, it seems tempting to introduce internal functions along the lines of vkd3d_create_thread(), vkd3d_join_thread(), etc.
Henri