#include "pipe/p_compiler.h"
#include "util/u_debug.h"
+#include "util/u_tests.h"
/* Helper function to wrap a screen with
#include "noop/noop_public.h"
#endif
+/*
+ * TODO: Audit the following *screen_create() - all of
+ * them should return the original screen on failuire.
+ */
static INLINE struct pipe_screen *
debug_screen_wrap(struct pipe_screen *screen)
{
-
#if defined(GALLIUM_RBUG)
screen = rbug_screen_create(screen);
#endif
screen = noop_screen_create(screen);
#endif
+ if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
+ util_run_tests(screen);
+
return screen;
}