summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-02-01 12:59:27 +0100
committerMarek Olšák <[email protected]>2015-02-06 22:27:06 +0100
commitdcf996c31eb818a85adb0187cdb4df0b9f14d1d9 (patch)
tree73b7dba3271788d3444e146cd6b6316b9d19bf25 /src/gallium/auxiliary/util
parent0271ac72d192c0cc092a3f6f47dab88923be1bdb (diff)
gallium: run gallium tests if GALLIUM_TESTS=1 is set
Reviewed-by: Glenn Kennard <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_tests.c9
-rw-r--r--src/gallium/auxiliary/util/u_tests.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c
index b42f5e137ba..764c4c31944 100644
--- a/src/gallium/auxiliary/util/u_tests.c
+++ b/src/gallium/auxiliary/util/u_tests.c
@@ -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);
}
diff --git a/src/gallium/auxiliary/util/u_tests.h b/src/gallium/auxiliary/util/u_tests.h
index a1439347d27..49ae54f876b 100644
--- a/src/gallium/auxiliary/util/u_tests.h
+++ b/src/gallium/auxiliary/util/u_tests.h
@@ -30,8 +30,8 @@
#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