vkd3d: Pass a proper struct shader_cache_key * to rb_put() in vkd3d_shader_cache_add_entry().

This commit is contained in:
Stefan Dösinger 2024-08-02 19:21:04 +03:00 committed by Henri Verbeet
parent 46aec9fba8
commit d4c2a7f22b
Notes: Henri Verbeet 2024-08-05 16:16:50 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/977

View File

@ -69,7 +69,14 @@ static int vkd3d_shader_cache_compare_key(const void *key, const struct rb_entry
static void vkd3d_shader_cache_add_entry(struct vkd3d_shader_cache *cache,
struct shader_cache_entry *e)
{
rb_put(&cache->tree, &e->h.hash, &e->entry);
const struct shader_cache_key k =
{
.hash = e->h.hash,
.key_size = e->h.key_size,
.key = e->payload
};
rb_put(&cache->tree, &k, &e->entry);
}
int vkd3d_shader_open_cache(struct vkd3d_shader_cache **cache)