Mesa (master): util: Include bitscan.h directly
Ian Romanick
idr at kemper.freedesktop.org
Thu Mar 29 22:24:37 UTC 2018
Module: Mesa
Branch: master
Commit: 4925347ec5d469574f1280e972940cfea345ed6e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4925347ec5d469574f1280e972940cfea345ed6e
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Jul 26 13:32:01 2017 -0700
util: Include bitscan.h directly
Previously bitset.h would include u_math.h to get bitscan.h. u_math.h
lives in src/gallium/auxiliary/util while both bitset.h and bitscan.h
live in src/util. Having the one file directly include another file
that lives in the same directory makes much more sense.
As a side-effect, several files need to directly include standard header
files that were previously indirectly included.
v2: Fix build break in src/amd/common/ac_nir_to_llvm.c.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
---
src/amd/common/ac_nir_to_llvm.c | 1 +
src/compiler/nir/nir.c | 1 +
src/compiler/spirv/vtn_alu.c | 1 +
src/compiler/spirv/vtn_glsl450.c | 1 +
src/util/bitset.h | 2 +-
5 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 7efbe4b31a..053c19808f 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -28,6 +28,7 @@
#include "sid.h"
#include "nir/nir.h"
#include "util/bitscan.h"
+#include "util/u_math.h"
#include "ac_shader_abi.h"
#include "ac_shader_util.h"
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index a97b119bf7..3fb16e6ca5 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -28,6 +28,7 @@
#include "nir.h"
#include "nir_control_flow_private.h"
#include "util/half_float.h"
+#include <limits.h>
#include <assert.h>
#include <math.h>
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
index 01be397e27..fc378495b8 100644
--- a/src/compiler/spirv/vtn_alu.c
+++ b/src/compiler/spirv/vtn_alu.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include <math.h>
#include "vtn_private.h"
/*
diff --git a/src/compiler/spirv/vtn_glsl450.c b/src/compiler/spirv/vtn_glsl450.c
index 7d32914d51..eb0b90f797 100644
--- a/src/compiler/spirv/vtn_glsl450.c
+++ b/src/compiler/spirv/vtn_glsl450.c
@@ -25,6 +25,7 @@
*
*/
+#include <math.h>
#include "vtn_private.h"
#include "GLSL.std.450.h"
diff --git a/src/util/bitset.h b/src/util/bitset.h
index b4c2152023..75e29a9a51 100644
--- a/src/util/bitset.h
+++ b/src/util/bitset.h
@@ -31,7 +31,7 @@
#ifndef BITSET_H
#define BITSET_H
-#include "util/u_math.h"
+#include "util/bitscan.h"
/****************************************************************************
* generic bitset implementation
More information about the mesa-commit
mailing list