Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
+#include "util/u_tests.h"
/* Helper function to wrap a screen with
screen = noop_screen_create(screen);
#endif
+ if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
+ util_run_tests(screen);
+
return screen;
}
* context_create.
*/
void
-util_run_tests(struct pipe_context *ctx)
+util_run_tests(struct pipe_screen *screen)
{
+ struct pipe_context *ctx = screen->context_create(screen, NULL);
+
tgsi_vs_window_space_position(ctx);
+
+ ctx->destroy(ctx);
+
+ puts("Done. Exiting..");
+ exit(0);
}
#include "pipe/p_compiler.h"
-struct pipe_context;
+struct pipe_screen;
-void util_run_tests(struct pipe_context *ctx);
+void util_run_tests(struct pipe_screen *screen);
#endif