Mesa (master): nv50/ra: `isinf()` is in namespace `std` since C++11.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Apr 13 06:43:15 UTC 2016
Module: Mesa
Branch: master
Commit: f525db6358fbaa7b4296d2e6484e0b1ae703ac78
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f525db6358fbaa7b4296d2e6484e0b1ae703ac78
Author: Pierre Moreau <pierre.morrow at free.fr>
Date: Fri Mar 18 01:17:31 2016 +0100
nv50/ra: `isinf()` is in namespace `std` since C++11.
This fixes a compile error while building Nouveau with C++11 enabled (and
glibc >= 2.23). This happens if SWR is enabled, as it forces C++11.
Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
Signed-off-by: Jose Fonseca <jfonseca at vmware.com>
https://bugs.freedesktop.org/show_bug.cgi?id=94907
---
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 500ab89..1b595ae 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -1327,7 +1327,11 @@ GCRA::simplify()
bestScore = score;
}
}
+#if __cplusplus >= 201103L
+ if (std::isinf(bestScore)) {
+#else
if (isinf(bestScore)) {
+#endif
ERROR("no viable spill candidates left\n");
break;
}
More information about the mesa-commit
mailing list