summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2014-09-25 12:23:02 +0900
committerMichel Dänzer <[email protected]>2014-09-26 11:35:52 +0900
commit4a38b154fd02061d8989f8973fbc10740300bf8b (patch)
treeba31bf1d48230c6f33455af1d4490f7ea53c558a /src/gallium/drivers/llvmpipe
parentcdc4de121564a47cbdac760622b6dc7112e548aa (diff)
gallivm: More fallout from disabling with LLVM 3.6
The draw module would still try to use gallivm, causing many piglit tests to fail with an assertion failure. llvmpipe might have been similarly affected. Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_main.c5
4 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index 261702f7109..9acde4f1b06 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -231,10 +231,10 @@ lp_jit_screen_cleanup(struct llvmpipe_screen *screen)
}
-void
+boolean
lp_jit_screen_init(struct llvmpipe_screen *screen)
{
- lp_build_init();
+ return lp_build_init();
}
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index 1325a8cc482..097fa7dce7c 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -252,7 +252,7 @@ void
lp_jit_screen_cleanup(struct llvmpipe_screen *screen);
-void
+boolean
lp_jit_screen_init(struct llvmpipe_screen *screen);
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index e6597e95ea4..30253222910 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -557,6 +557,9 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
return NULL;
#endif
+ if (!lp_jit_screen_init(screen))
+ return NULL;
+
#ifdef DEBUG
LP_DEBUG = debug_get_flags_option("LP_DEBUG", lp_debug_flags, 0 );
#endif
@@ -588,8 +591,6 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
llvmpipe_init_screen_resource_funcs(&screen->base);
- lp_jit_screen_init(screen);
-
screen->num_threads = util_cpu_caps.nr_cpus > 1 ? util_cpu_caps.nr_cpus : 0;
#ifdef PIPE_SUBSYSTEM_EMBEDDED
screen->num_threads = 0;
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index 8a896becf53..c7b6d65fa30 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_main.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_main.c
@@ -376,6 +376,9 @@ int main(int argc, char **argv)
fpstate = util_fpstate_get();
util_fpstate_set_denorms_to_zero(fpstate);
+ if (!lp_build_init())
+ return 1;
+
for(i = 1; i < argc; ++i) {
if(strcmp(argv[i], "-v") == 0)
++verbose;
@@ -387,8 +390,6 @@ int main(int argc, char **argv)
n = atoi(argv[i]);
}
- lp_build_init();
-
#ifdef DEBUG
if (verbose >= 2) {
gallivm_debug |= GALLIVM_DEBUG_IR;