mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
util: Fix unsigned <-> ptr conversions.
This commit is contained in:
parent
aa7a47dcbd
commit
ee15d5a0c4
1 changed files with 3 additions and 3 deletions
|
|
@ -9,13 +9,13 @@
|
|||
static unsigned
|
||||
hash(void *key)
|
||||
{
|
||||
return (unsigned)key;
|
||||
return (unsigned)(uintptr_t)key;
|
||||
}
|
||||
|
||||
static int
|
||||
compare(void *key1, void *key2)
|
||||
{
|
||||
return (unsigned)key1 - (unsigned)key2;
|
||||
return (unsigned)(uintptr_t)key1 - (unsigned)(uintptr_t)key2;
|
||||
}
|
||||
|
||||
struct pipe_surface *
|
||||
|
|
@ -67,7 +67,7 @@ util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps)
|
|||
struct pipe_resource *pt = ps->texture;
|
||||
if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
|
||||
{ /* or 2D array */
|
||||
void* key = (void*)(((ps->zslice + ps->face) << 8) | ps->level);
|
||||
void* key = (void*)(uintptr_t)(((ps->zslice + ps->face) << 8) | ps->level);
|
||||
util_hash_table_remove(us->u.table, key);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue