gallium: run gallium tests if GALLIUM_TESTS=1 is set
[mesa.git] / src / gallium / auxiliary / util / u_tests.c
index b42f5e137ba8ec457529a527f8e065f437a3cdc4..764c4c319444747d9bb33ea02a1944556ba36701 100644 (file)
@@ -261,7 +261,14 @@ tgsi_vs_window_space_position(struct pipe_context *ctx)
  * 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);
 }