[Mesa-dev] [PATCH 3/8] softpipe: set softpipe_screen::use_llvm when draw is build with LLVM
Emil Velikov
emil.l.velikov at gmail.com
Thu Jan 26 18:27:03 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Currently we can build draw without LLVM thus honouring SOFTPIPE_USE_LLVM
is misleading even if most of the code nicely falls-back to no-op in the
lack of LLVM.
That does not seem to be the case in softpipe_draw_vbo() where extra
prepare {prepare,cleanup}_{vertex,geometry}_sampling is present.
Haven't checked how much overhead the causes, but omitting it is the
correct thing to do, afaict.
Note: the topic of "is it a smart idea to have softpipe build with
LLVM-less draw" is to be checked another day.
Cc: Roland Scheidegger <sroland at vmware.com>
Cc: Jose Fonseca <jfonseca at vmware.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
It's the better thing to do imho, but if you feel strongly against it
feel free to drop it.
---
src/gallium/drivers/softpipe/sp_screen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 9bc8d10e8e..1a58eb9d99 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -568,7 +568,9 @@ softpipe_create_screen(struct sw_winsys *winsys)
screen->base.context_create = softpipe_create_context;
screen->base.flush_frontbuffer = softpipe_flush_frontbuffer;
screen->base.get_compute_param = softpipe_get_compute_param;
+#ifdef HAVE_LLVM
screen->use_llvm = debug_get_option_use_llvm();
+#endif
util_format_s3tc_init();
--
2.11.0
More information about the mesa-dev
mailing list