Jacek Caban (@jacek) commented about dlls/winevulkan/vulkan.c:
static const struct vulkan_funcs *vk_funcs;
-#define WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, client_handle, host_handle, object) \
- wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (uintptr_t)(host_handle), &(object)->mapping)
-#define WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, client_handle, host_handle, object) \
- wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (host_handle), &(object)->mapping)
-static void wine_vk_add_handle_mapping(struct wine_instance *instance, uint64_t wrapped_handle,
uint64_t host_handle, struct wine_vk_mapping *mapping)
+static int wrapper_entry_compare(const void *key, const struct rb_entry *entry) +{
- struct wrapper_entry *wrapper = RB_ENTRY_VALUE(entry, struct wrapper_entry, entry);
- const uint64_t *host_handle = key;
- return *host_handle - wrapper->host_handle;
This is not enough, the result is truncated to int.