[Mesa-dev] [PATCH 3/8] softpipe: set softpipe_screen::use_llvm when draw is build with LLVM
Roland Scheidegger
sroland at vmware.com
Thu Jan 26 20:17:09 UTC 2017
Am 26.01.2017 um 19:27 schrieb Emil Velikov:
> 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.
This might not make much sense for other drivers, but for softpipe it
probably really does - it also defaults to non-llvm draw.
You are right though that we shouldn't set use_llvm if we didn't build
with llvm.
As for appending LLVM to the name, this sounds about right to me. Albeit
what we probably really want to know is if draw is actually using llvm,
not just if it was built with it (in particular with softpipe which
defaults to non-llvm). But no big deal...
For the series:
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
>
> 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();
>
>
More information about the mesa-dev
mailing list