[Mesa-dev] [PATCH 8/8] nouveau: let .get_name() append LLVM if built with LLVM

Ilia Mirkin imirkin at alum.mit.edu
Thu Jan 26 19:46:52 UTC 2017


Yeah, I'd much prefer this to be

if (nouveau_screen(pscreen)->class_3d < NV50_3D_CLASS)
  llvm = " LLVM";

or something along those lines. [Using dev->chipset will be annoying
since nv50 = 0x50, and nv67 (nv4x) = 0x67.]

On Thu, Jan 26, 2017 at 1:27 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Analogous to previous two commits. Afaict only nv30 uses draw, so if
> people prefer we can restrict this print only to those devices.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Unrelated:
> Wasn't there a kernel/libdrm helper which can give us the complete
> device name ?
> ---
>  src/gallium/drivers/nouveau/nouveau_screen.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
> index f59e101caf..24177bd7da 100644
> --- a/src/gallium/drivers/nouveau/nouveau_screen.c
> +++ b/src/gallium/drivers/nouveau/nouveau_screen.c
> @@ -33,8 +33,13 @@ nouveau_screen_get_name(struct pipe_screen *pscreen)
>  {
>     struct nouveau_device *dev = nouveau_screen(pscreen)->device;
>     static char buffer[128];
> +   const char *llvm = "";
>
> -   util_snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset);
> +#ifdef HAVE_LLVM
> +   llvm = " LLVM";
> +#endif
> +
> +   util_snprintf(buffer, sizeof(buffer), "NV%02X%s", dev->chipset, llvm);
>     return buffer;
>  }
>
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list