wined3d: Properly compare integers in wined3d_bo_slab_vk_compare().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
18a6d9ab0e
commit
162fc7bd46
|
@ -1883,12 +1883,13 @@ static int wined3d_bo_slab_vk_compare(const void *key, const struct wine_rb_entr
|
|||
{
|
||||
const struct wined3d_bo_slab_vk *slab = WINE_RB_ENTRY_VALUE(entry, const struct wined3d_bo_slab_vk, entry);
|
||||
const struct wined3d_bo_slab_vk_key *k = key;
|
||||
int ret;
|
||||
|
||||
if (k->memory_type != slab->requested_memory_type)
|
||||
return k->memory_type - slab->requested_memory_type;
|
||||
if (k->usage != slab->bo.usage)
|
||||
return k->usage - slab->bo.usage;
|
||||
return k->size - slab->bo.size;
|
||||
if ((ret = wined3d_uint32_compare(k->memory_type, slab->requested_memory_type)))
|
||||
return ret;
|
||||
if ((ret = wined3d_uint32_compare(k->usage, slab->bo.usage)))
|
||||
return ret;
|
||||
return wined3d_uint64_compare(k->size, slab->bo.size);
|
||||
}
|
||||
|
||||
static void wined3d_context_vk_init_graphics_pipeline_key(struct wined3d_context_vk *context_vk)
|
||||
|
|
|
@ -452,6 +452,11 @@ static inline int wined3d_uint32_compare(uint32_t x, uint32_t y)
|
|||
return (x > y) - (x < y);
|
||||
}
|
||||
|
||||
static inline int wined3d_uint64_compare(uint64_t x, uint64_t y)
|
||||
{
|
||||
return (x > y) - (x < y);
|
||||
}
|
||||
|
||||
#define ORM_BACKBUFFER 0
|
||||
#define ORM_FBO 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue