vk/util: Add a anv_finishme function/macro

This commit is contained in:
Jason Ekstrand
2015-05-12 13:43:36 -07:00
parent 7727720585
commit d3b374ce59
2 changed files with 20 additions and 0 deletions

View File

@@ -85,6 +85,14 @@ vk_error(VkResult 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
* removed from tail. head and tail are free-running uint32_t indices and we

View File

@@ -30,6 +30,18 @@
#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
anv_vector_init(struct anv_vector *vector, uint32_t element_size, uint32_t size)
{