- return error;
-}
-
-int
-anv_vector_init(struct anv_vector *vector, uint32_t element_size, uint32_t size)
-{
- assert(util_is_power_of_two(size));
- assert(element_size < size && util_is_power_of_two(element_size));
-
- vector->head = 0;
- vector->tail = 0;
- vector->element_size = element_size;
- vector->size = size;
- vector->data = malloc(size);
-
- return vector->data != NULL;
-}
-
-void *
-anv_vector_add(struct anv_vector *vector)
-{
- uint32_t offset, size, split, tail;
- void *data;
-
- if (vector->head - vector->tail == vector->size) {
- size = vector->size * 2;
- data = malloc(size);
- if (data == NULL)
- return NULL;
- split = align_u32(vector->tail, vector->size);
- tail = vector->tail & (vector->size - 1);
- if (vector->head - split < vector->size) {
- memcpy(data + tail,
- vector->data + tail,
- split - vector->tail);
- memcpy(data + vector->size,
- vector->data, vector->head - split);
- } else {
- memcpy(data + tail,
- vector->data + tail,
- vector->head - vector->tail);
- }
- free(vector->data);
- vector->data = data;
- vector->size = size;
+ if (instance) {
+ vk_debug_report(&instance->debug_report_callbacks,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ type,
+ (uint64_t) (uintptr_t) object,
+ line,
+ 0,
+ "anv",
+ report);