diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 56440a9072b..b970bdd4959 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -104,7 +104,9 @@ /* Allocations are always at least 64 byte aligned, so 1 is an invalid value. * We use it to indicate the free list is empty. */ -#define EMPTY UINT32_MAX +#define ANV_FREE_LIST_EMPTY_VAL UINT32_MAX + +#define ANV_FREE_LIST_EMPTY ((union anv_free_list) { { ANV_FREE_LIST_EMPTY_VAL, 0 } }) /* On FreeBSD PAGE_SIZE is already defined in * /usr/include/machine/param.h that is indirectly @@ -329,7 +331,7 @@ anv_free_list_pop(union anv_free_list *list, union anv_free_list current, new, old; current.u64 = list->u64; - while (current.offset != EMPTY) { + while (current.offset != ANV_FREE_LIST_EMPTY_VAL) { __sync_synchronize(); new.offset = table->map[current.offset].next; new.count = current.count + 1; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index ac7f587448e..3d493c0c840 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -708,8 +708,6 @@ union anv_free_list { alignas(8) uint64_t u64; }; -#define ANV_FREE_LIST_EMPTY ((union anv_free_list) { { UINT32_MAX, 0 } }) - struct anv_block_state { union { struct {