vk/util: Add a anv_finishme function/macro
This commit is contained in:
@@ -85,6 +85,14 @@ vk_error(VkResult error)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __anv_finishme(const char *file, int line, const char *format, ...);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print a FINISHME message, including its source location.
|
||||||
|
*/
|
||||||
|
#define anv_finishme(format, ...) \
|
||||||
|
__anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A dynamically growable, circular buffer. Elements are added at head and
|
* A dynamically growable, circular buffer. Elements are added at head and
|
||||||
* removed from tail. head and tail are free-running uint32_t indices and we
|
* removed from tail. head and tail are free-running uint32_t indices and we
|
||||||
|
@@ -30,6 +30,18 @@
|
|||||||
|
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
__anv_finishme(const char *file, int line, const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, format);
|
||||||
|
fprintf(stderr, "%s:%d: FINISHME: ", file, line);
|
||||||
|
vfprintf(stderr, format, ap);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
anv_vector_init(struct anv_vector *vector, uint32_t element_size, uint32_t size)
|
anv_vector_init(struct anv_vector *vector, uint32_t element_size, uint32_t size)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user