mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 21:20:14 +01:00
anv: Define anv_validate macro
If a block of code is annotated with anv_validate, then the block runs only in debug builds.
This commit is contained in:
parent
81f8b82fc8
commit
855180b3d9
1 changed files with 10 additions and 0 deletions
|
|
@ -164,6 +164,16 @@ void anv_loge_v(const char *format, va_list va);
|
|||
#define anv_assert(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If a block of code is annotated with anv_validate, then the block runs only
|
||||
* in debug builds.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#define anv_validate if (1)
|
||||
#else
|
||||
#define anv_validate if (0)
|
||||
#endif
|
||||
|
||||
void anv_abortf(const char *format, ...) anv_noreturn anv_printflike(1, 2);
|
||||
void anv_abortfv(const char *format, va_list va) anv_noreturn;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue