[Mesa-dev] [PATCH 2/3] gallium/nouveau: use std::isfinite in c++ sources
Ilia Mirkin
imirkin at alum.mit.edu
Sun Oct 19 08:23:24 PDT 2014
Can you provide more detail as to why the util/u_math.h include is
insufficient? Perhaps it should be fixed up similarly to how
mesa/main/imports.h does it?
-ilia
On Sun, Oct 19, 2014 at 11:16 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Mauro Rossi <issor.oruam at gmail.com>
>
> Otherwise the android build will fail.
>
> Cc: "10.2 10.3" <mesa-stable at lists.freedesktop.org>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> index 719f980..b9744e3 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> @@ -24,9 +24,7 @@
> #include "codegen/nv50_ir_target.h"
> #include "codegen/nv50_ir_build_util.h"
>
> -extern "C" {
> -#include "util/u_math.h"
> -}
> +#include <cmath>
>
> namespace nv50_ir {
>
> @@ -416,9 +414,9 @@ ConstantFolding::expr(Instruction *i,
> case OP_FMA:
> case OP_MUL:
> if (i->dnz && i->dType == TYPE_F32) {
> - if (!isfinite(a->data.f32))
> + if (!std::isfinite(a->data.f32))
> a->data.f32 = 0.0f;
> - if (!isfinite(b->data.f32))
> + if (!std::isfinite(b->data.f32))
> b->data.f32 = 0.0f;
> }
> switch (i->dType) {
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list