It's a mess, but this is what I arrived at.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
#include <inttypes.h>
#include <locale.h>
#include <xf86drm.h>
+#include <stdlib.h>
#include "util/u_math.h"
bo = find_in_bucket(bucket, flags);
if (bo) {
VG_BO_OBTAIN(bo);
- if (bo->funcs->madvise(bo, TRUE) <= 0) {
+ if (bo->funcs->madvise(bo, true) <= 0) {
/* we've lost the backing pages, delete and try again: */
pthread_mutex_lock(&table_lock);
bo_del(bo);
if (bucket) {
struct timespec time;
- bo->funcs->madvise(bo, FALSE);
+ bo->funcs->madvise(bo, false);
clock_gettime(CLOCK_MONOTONIC, &time);
dev->fd = fd;
dev->handle_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
dev->name_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
- fd_bo_cache_init(&dev->bo_cache, FALSE);
- fd_bo_cache_init(&dev->ring_cache, TRUE);
+ fd_bo_cache_init(&dev->bo_cache, false);
+ fd_bo_cache_init(&dev->ring_cache, true);
return dev;
}
#include "gallivm/lp_bld.h"
+#include "pipe/p_compiler.h"
struct lp_type;
#include "util/u_debug.h"
#include "util/u_cpu_detect.h"
-DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", FALSE);
+DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", false);
static struct util_cpu_caps *get_cpu_caps(void)
{
#ifndef TGSI_UREG_H
#define TGSI_UREG_H
+#include "pipe/p_defines.h"
#include "pipe/p_format.h"
#include "pipe/p_compiler.h"
#include "pipe/p_shader_tokens.h"
#define UTIL_ASYNC_DEBUG_H
#include "pipe/p_state.h"
-
+#include "util/u_debug.h"
#include "util/simple_mtx.h"
struct util_debug_message {
#include "util/u_idalloc.h"
#include "util/u_math.h"
-#include "util/u_memory.h"
+#include <stdlib.h>
void
util_idalloc_init(struct util_idalloc *buf)
extern unsigned i915_debug;
#ifdef DEBUG
-static inline boolean
+static inline bool
I915_DBG_ON(unsigned flags)
{
return i915_debug & flags;
PIPE_FD_TYPE_SYNCOBJ,
};
-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,
-};
-
/**
* counter type and counter data type enums used by INTEL_performance_query
* APIs in gallium drivers.
#define _NINE_DEBUG_H_
#include "util/u_debug.h"
+#include "pipe/p_compiler.h"
void
_nine_debug_printf( unsigned long flag,
#include "util/u_hash_table.h"
#include "util/u_memory.h"
+#include "util/u_pointer.h"
#include "etnaviv/etnaviv_screen.h"
#include "etnaviv/hw/common.xml.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_hash_table.h"
+#include "util/u_pointer.h"
#include "os/os_thread.h"
#include "freedreno_drm_public.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_hash_table.h"
+#include "util/u_pointer.h"
#include "os/os_thread.h"
#include "nouveau_drm_public.h"
#include "util/u_cpu_detect.h"
#include "util/u_memory.h"
#include "util/u_hash_table.h"
+#include "util/u_pointer.h"
#include <xf86drm.h>
#include <stdio.h>
#include "util/format/u_format.h"
#include "util/u_hash_table.h"
#include "util/u_inlines.h"
+#include "util/u_pointer.h"
#include "state_tracker/drm_driver.h"
#include "virgl/virgl_screen.h"
#include "virgl/virgl_public.h"
#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 */
*/
#include "pipe/p_config.h"
+#include "pipe/p_compiler.h"
#include "util/u_debug.h"
#include "u_cpu_detect.h"
#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
#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
#ifndef U_MEMORY_H
#define U_MEMORY_H
-#include "util/u_pointer.h"
#include "util/u_debug.h"
#include "util/os_memory.h"
* 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)
#include "util/u_memory.h"
#include "util/u_mm.h"
+#include "util/macros.h"
void