gallivm: Add missing header for powf.
authorVinson Lee <vlee@freedesktop.org>
Tue, 7 Apr 2020 01:21:54 +0000 (18:21 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 21:48:31 +0000 (21:48 +0000)
commitff8daa013621019f1606dc0c188b16f1ce34fea7
tree73925e2a62d4c68c0c0f7a1ad91d169b17eb553a
parent4399cacaf077d7c09f641a0b6cb935ab6e0e45b4
gallivm: Add missing header for powf.

Fix build error after llvm-11 commit 3a29393b4709 ("Remove
math.h/cmath include from DataTypes.h").

src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c: In function ‘lp_build_linear_to_srgb’:
src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:194:44: error: implicit declaration of function ‘powf’ [-Werror=implicit-function-declaration]
  194 |                                  exp2f_c * powf(coeff_f, 1.0f / exp_f));
      |                                            ^~~~
src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:194:44: warning: incompatible implicit declaration of built-in function ‘powf’
src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:78:1: note: include ‘<math.h>’ or provide a declaration of ‘powf’
   77 | #include "lp_bld_format.h"
  +++ |+#include <math.h>
   78 |

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4473>
src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c