diff options
author | Marek Olšák <[email protected]> | 2020-03-25 23:44:59 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-27 21:00:10 +0000 |
commit | 71646745002504302bcef51bdb438abbe66961fc (patch) | |
tree | 6f1aaa9b23d2c378be574922feffd5488c44d0a9 /src/util | |
parent | 013b65635f1db45650809d8d802436c1e9d009e3 (diff) |
util: don't include p_defines.h and u_pointer.h from gallium
It's a mess, but this is what I arrived at.
Reviewed-by: Timothy Arceri <[email protected]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/macros.h | 14 | ||||
-rw-r--r-- | src/util/u_cpu_detect.c | 3 | ||||
-rw-r--r-- | src/util/u_debug.h | 7 | ||||
-rw-r--r-- | src/util/u_memory.h | 3 | ||||
-rw-r--r-- | src/util/u_mm.c | 1 |
5 files changed, 21 insertions, 7 deletions
diff --git a/src/util/macros.h b/src/util/macros.h index 55dd80c870b..fcace4e351d 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -332,4 +332,18 @@ do { \ #define BITFIELD64_RANGE(b, count) \ (BITFIELD64_MASK((b) + (count)) & ~BITFIELD64_MASK(b)) +/* TODO: In future we should try to move this to u_debug.h once header + * dependencies are reorganised to allow this. + */ +enum pipe_debug_type +{ + PIPE_DEBUG_TYPE_OUT_OF_MEMORY = 1, + PIPE_DEBUG_TYPE_ERROR, + PIPE_DEBUG_TYPE_SHADER_INFO, + PIPE_DEBUG_TYPE_PERF_INFO, + PIPE_DEBUG_TYPE_INFO, + PIPE_DEBUG_TYPE_FALLBACK, + PIPE_DEBUG_TYPE_CONFORMANCE, +}; + #endif /* UTIL_MACROS_H */ diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index 79da996a7aa..ab064957382 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -33,6 +33,7 @@ */ #include "pipe/p_config.h" +#include "pipe/p_compiler.h" #include "util/u_debug.h" #include "u_cpu_detect.h" @@ -83,7 +84,7 @@ #ifdef DEBUG -DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", false) #endif diff --git a/src/util/u_debug.h b/src/util/u_debug.h index bc6cd8ac2a9..a9e44bf24e2 100644 --- a/src/util/u_debug.h +++ b/src/util/u_debug.h @@ -38,18 +38,17 @@ #ifndef U_DEBUG_H_ #define U_DEBUG_H_ - +#include <stdarg.h> +#include <string.h> #include "util/os_misc.h" #include "util/detect_os.h" +#include "util/macros.h" #if DETECT_OS_HAIKU /* Haiku provides debug_printf in libroot with OS.h */ #include <OS.h> #endif -#include "pipe/p_defines.h" - - #ifdef __cplusplus extern "C" { #endif diff --git a/src/util/u_memory.h b/src/util/u_memory.h index dc22ab0fd1a..15a0bb419b5 100644 --- a/src/util/u_memory.h +++ b/src/util/u_memory.h @@ -34,7 +34,6 @@ #ifndef U_MEMORY_H #define U_MEMORY_H -#include "util/u_pointer.h" #include "util/u_debug.h" #include "util/os_memory.h" @@ -75,7 +74,7 @@ align_calloc(size_t size, unsigned long alignment) * Duplicate a block of memory. */ static inline void * -mem_dup(const void *src, uint size) +mem_dup(const void *src, size_t size) { void *dup = MALLOC(size); if (dup) diff --git a/src/util/u_mm.c b/src/util/u_mm.c index 0d275976688..305d16f6fd7 100644 --- a/src/util/u_mm.c +++ b/src/util/u_mm.c @@ -27,6 +27,7 @@ #include "util/u_memory.h" #include "util/u_mm.h" +#include "util/macros.h" void |