mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 17:30:24 +01:00
util/idalloc: reserving an ID that already exists should be no-op
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
This commit is contained in:
parent
6ede24cf31
commit
02f37cb9da
1 changed files with 0 additions and 1 deletions
|
|
@ -99,7 +99,6 @@ util_idalloc_reserve(struct util_idalloc *buf, unsigned id)
|
|||
{
|
||||
if (id / 32 >= buf->num_elements)
|
||||
util_idalloc_resize(buf, (id / 32 + 1) * 2);
|
||||
assert((buf->data[id / 32] & (1u << (id % 32))) == 0);
|
||||
buf->data[id / 32] |= 1u << (id % 32);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue