diff --git a/docs/gallium/buffermapping.rst b/docs/gallium/buffermapping.rst index 51f57ea4ec1..bd8fc6d4a5c 100644 --- a/docs/gallium/buffermapping.rst +++ b/docs/gallium/buffermapping.rst @@ -403,7 +403,7 @@ Buffer mapping conclusions * Buffer valid range tracking doesn't need to be fancy, "number of bytes valid starting from 0" is sufficient for all examples found. -* Use the ``pipe_debug_callback`` to report stalls on buffer mapping to ease +* Use the ``util_debug_callback`` to report stalls on buffer mapping to ease debug. * Buffer binding points are not useful for tuning buffer placement (See all the diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index 30015456a07..2b44b23ac44 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -1951,7 +1951,7 @@ trace_context_set_context_param(struct pipe_context *_context, } static void -trace_context_set_debug_callback(struct pipe_context *_context, const struct pipe_debug_callback *cb) +trace_context_set_debug_callback(struct pipe_context *_context, const struct util_debug_callback *cb) { struct trace_context *tr_context = trace_context(_context); struct pipe_context *context = tr_context->pipe; diff --git a/src/gallium/auxiliary/util/u_async_debug.c b/src/gallium/auxiliary/util/u_async_debug.c index 93d3e3784c5..a08b938c3ba 100644 --- a/src/gallium/auxiliary/util/u_async_debug.c +++ b/src/gallium/auxiliary/util/u_async_debug.c @@ -97,7 +97,7 @@ u_async_debug_cleanup(struct util_async_debug_callback *adbg) void _u_async_debug_drain(struct util_async_debug_callback *adbg, - struct pipe_debug_callback *dst) + struct util_debug_callback *dst) { simple_mtx_lock(&adbg->lock); for (unsigned i = 0; i < adbg->count; ++i) { diff --git a/src/gallium/auxiliary/util/u_async_debug.h b/src/gallium/auxiliary/util/u_async_debug.h index 5f27d21d294..f1c7706442d 100644 --- a/src/gallium/auxiliary/util/u_async_debug.h +++ b/src/gallium/auxiliary/util/u_async_debug.h @@ -25,7 +25,7 @@ /** * \file u_async_debug.h - * Provides a helper implementation of pipe_debug_callback which allows debug + * Provides a helper implementation of util_debug_callback which allows debug * messages from non-application threads to be passed back to the application * thread. */ @@ -48,7 +48,7 @@ struct util_debug_message { }; struct util_async_debug_callback { - struct pipe_debug_callback base; + struct util_debug_callback base; simple_mtx_t lock; unsigned count; @@ -63,11 +63,11 @@ u_async_debug_cleanup(struct util_async_debug_callback *adbg); void _u_async_debug_drain(struct util_async_debug_callback *adbg, - struct pipe_debug_callback *dst); + struct util_debug_callback *dst); static inline void u_async_debug_drain(struct util_async_debug_callback *adbg, - struct pipe_debug_callback *dst) + struct util_debug_callback *dst) { /* Read the count without taking the lock to avoid atomics in the fast path. * We'll re-read the count after taking the lock. */ diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index daab30f9fa8..de1ead7eabd 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2769,7 +2769,7 @@ tc_dump_debug_state(struct pipe_context *_pipe, FILE *stream, static void tc_set_debug_callback(struct pipe_context *_pipe, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct threaded_context *tc = threaded_context(_pipe); struct pipe_context *pipe = tc->pipe; diff --git a/src/gallium/drivers/crocus/crocus_batch.h b/src/gallium/drivers/crocus/crocus_batch.h index fe6857d83ed..d26a721c66f 100644 --- a/src/gallium/drivers/crocus/crocus_batch.h +++ b/src/gallium/drivers/crocus/crocus_batch.h @@ -83,7 +83,7 @@ struct crocus_growing_bo { struct crocus_batch { struct crocus_context *ice; struct crocus_screen *screen; - struct pipe_debug_callback *dbg; + struct util_debug_callback *dbg; struct pipe_device_reset_callback *reset; /** What batch is this? (e.g. CROCUS_BATCH_RENDER/COMPUTE) */ diff --git a/src/gallium/drivers/crocus/crocus_bufmgr.c b/src/gallium/drivers/crocus/crocus_bufmgr.c index d3fe5ee42f5..d09453ff6cb 100644 --- a/src/gallium/drivers/crocus/crocus_bufmgr.c +++ b/src/gallium/drivers/crocus/crocus_bufmgr.c @@ -740,7 +740,7 @@ __crocus_bo_unreference(struct crocus_bo *bo) } static void -bo_wait_with_stall_warning(struct pipe_debug_callback *dbg, +bo_wait_with_stall_warning(struct util_debug_callback *dbg, struct crocus_bo *bo, const char *action) { @@ -777,7 +777,7 @@ print_flags(unsigned flags) } static void * -crocus_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, +crocus_bo_gem_mmap_legacy(struct util_debug_callback *dbg, struct crocus_bo *bo, bool wc) { struct crocus_bufmgr *bufmgr = bo->bufmgr; @@ -800,7 +800,7 @@ crocus_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, } static void * -crocus_bo_gem_mmap_offset(struct pipe_debug_callback *dbg, struct crocus_bo *bo, +crocus_bo_gem_mmap_offset(struct util_debug_callback *dbg, struct crocus_bo *bo, bool wc) { struct crocus_bufmgr *bufmgr = bo->bufmgr; @@ -831,7 +831,7 @@ crocus_bo_gem_mmap_offset(struct pipe_debug_callback *dbg, struct crocus_bo *bo, } static void * -crocus_bo_gem_mmap(struct pipe_debug_callback *dbg, struct crocus_bo *bo, bool wc) +crocus_bo_gem_mmap(struct util_debug_callback *dbg, struct crocus_bo *bo, bool wc) { struct crocus_bufmgr *bufmgr = bo->bufmgr; @@ -842,7 +842,7 @@ crocus_bo_gem_mmap(struct pipe_debug_callback *dbg, struct crocus_bo *bo, bool w } static void * -crocus_bo_map_cpu(struct pipe_debug_callback *dbg, +crocus_bo_map_cpu(struct util_debug_callback *dbg, struct crocus_bo *bo, unsigned flags) { /* We disallow CPU maps for writing to non-coherent buffers, as the @@ -900,7 +900,7 @@ crocus_bo_map_cpu(struct pipe_debug_callback *dbg, } static void * -crocus_bo_map_wc(struct pipe_debug_callback *dbg, +crocus_bo_map_wc(struct util_debug_callback *dbg, struct crocus_bo *bo, unsigned flags) { if (!bo->map_wc) { @@ -953,7 +953,7 @@ crocus_bo_map_wc(struct pipe_debug_callback *dbg, * tracking is handled on the buffer exchange instead. */ static void * -crocus_bo_map_gtt(struct pipe_debug_callback *dbg, +crocus_bo_map_gtt(struct util_debug_callback *dbg, struct crocus_bo *bo, unsigned flags) { struct crocus_bufmgr *bufmgr = bo->bufmgr; @@ -1048,7 +1048,7 @@ can_map_cpu(struct crocus_bo *bo, unsigned flags) } void * -crocus_bo_map(struct pipe_debug_callback *dbg, +crocus_bo_map(struct util_debug_callback *dbg, struct crocus_bo *bo, unsigned flags) { if (bo->tiling_mode != I915_TILING_NONE && !(flags & MAP_RAW)) diff --git a/src/gallium/drivers/crocus/crocus_bufmgr.h b/src/gallium/drivers/crocus/crocus_bufmgr.h index de550d99fa7..7ef318b9601 100644 --- a/src/gallium/drivers/crocus/crocus_bufmgr.h +++ b/src/gallium/drivers/crocus/crocus_bufmgr.h @@ -35,7 +35,7 @@ struct crocus_batch; struct intel_device_info; -struct pipe_debug_callback; +struct util_debug_callback; #define CROCUS_BINDER_SIZE (64 * 1024) #define CROCUS_MAX_BINDERS 100 @@ -238,7 +238,7 @@ static inline void crocus_bo_unreference(struct crocus_bo *bo) * This function will block waiting for any existing execution on the * buffer to complete, first. The resulting mapping is returned. */ -MUST_CHECK void *crocus_bo_map(struct pipe_debug_callback *dbg, +MUST_CHECK void *crocus_bo_map(struct util_debug_callback *dbg, struct crocus_bo *bo, unsigned flags); /** diff --git a/src/gallium/drivers/crocus/crocus_context.c b/src/gallium/drivers/crocus/crocus_context.c index ed0a3723007..27dc17dd538 100644 --- a/src/gallium/drivers/crocus/crocus_context.c +++ b/src/gallium/drivers/crocus/crocus_context.c @@ -40,7 +40,7 @@ */ static void crocus_set_debug_callback(struct pipe_context *ctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct crocus_context *ice = (struct crocus_context *)ctx; diff --git a/src/gallium/drivers/crocus/crocus_context.h b/src/gallium/drivers/crocus/crocus_context.h index 1031a18a913..66f7ecc31ea 100644 --- a/src/gallium/drivers/crocus/crocus_context.h +++ b/src/gallium/drivers/crocus/crocus_context.h @@ -442,7 +442,7 @@ struct crocus_context { struct threaded_context *thrctx; /** A debug callback for KHR_debug output. */ - struct pipe_debug_callback dbg; + struct util_debug_callback dbg; /** A device reset status callback for notifying that the GPU is hosed. */ struct pipe_device_reset_callback reset; diff --git a/src/gallium/drivers/crocus/crocus_resource.h b/src/gallium/drivers/crocus/crocus_resource.h index a6a819deaf1..537f920a14d 100644 --- a/src/gallium/drivers/crocus/crocus_resource.h +++ b/src/gallium/drivers/crocus/crocus_resource.h @@ -261,7 +261,7 @@ struct crocus_surface { */ struct crocus_transfer { struct threaded_transfer base; - struct pipe_debug_callback *dbg; + struct util_debug_callback *dbg; void *buffer; void *ptr; diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c index 557176bdaf0..c9471da5c9d 100644 --- a/src/gallium/drivers/crocus/crocus_screen.c +++ b/src/gallium/drivers/crocus/crocus_screen.c @@ -680,7 +680,7 @@ crocus_get_default_l3_config(const struct intel_device_info *devinfo, static void crocus_shader_debug_log(void *data, unsigned *id, const char *fmt, ...) { - struct pipe_debug_callback *dbg = data; + struct util_debug_callback *dbg = data; va_list args; if (!dbg->debug_message) @@ -694,7 +694,7 @@ crocus_shader_debug_log(void *data, unsigned *id, const char *fmt, ...) static void crocus_shader_perf_log(void *data, unsigned *id, const char *fmt, ...) { - struct pipe_debug_callback *dbg = data; + struct util_debug_callback *dbg = data; va_list args; va_start(args, fmt); diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index fc03dab3d3a..c0b0e966013 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -613,7 +613,7 @@ etna_context_force_flush(struct etna_cmd_stream *stream, void *priv) static void etna_set_debug_callback(struct pipe_context *pctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct etna_context *ctx = etna_context(pctx); diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h index 4d1f209b7af..9d5c4248f87 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.h +++ b/src/gallium/drivers/etnaviv/etnaviv_context.h @@ -185,7 +185,7 @@ struct etna_context { uint64_t rs_operations; } stats; - struct pipe_debug_callback debug; + struct util_debug_callback debug; int in_fence_fd; /* list of accumulated HW queries */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index 7c6be66e289..8fabd89b53c 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -375,7 +375,7 @@ etna_shader_stage(struct etna_shader_variant *shader) } static void -dump_shader_info(struct etna_shader_variant *v, struct pipe_debug_callback *debug) +dump_shader_info(struct etna_shader_variant *v, struct util_debug_callback *debug) { if (!unlikely(etna_mesa_debug & ETNA_DBG_SHADERDB)) return; @@ -430,7 +430,7 @@ fail: struct etna_shader_variant * etna_shader_variant(struct etna_shader *shader, struct etna_shader_key key, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { struct etna_shader_variant *v; diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.h b/src/gallium/drivers/etnaviv/etnaviv_shader.h index 17a61346057..726761b0af4 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.h +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.h @@ -95,7 +95,7 @@ etna_shader_update_vertex(struct etna_context *ctx); struct etna_shader_variant * etna_shader_variant(struct etna_shader *shader, struct etna_shader_key key, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); void etna_shader_init(struct pipe_context *pctx); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index cf8f16dbeea..6a4ecce081a 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -43,7 +43,7 @@ void fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring, /* grouped together emit-state for prog/vertex/state emit: */ struct fd3_emit { - struct pipe_debug_callback *debug; + struct util_debug_callback *debug; const struct fd_vertex_state *vtx; const struct fd3_program_state *prog; const struct pipe_draw_info *info; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h index d4299085e92..e392381ec48 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h @@ -41,7 +41,7 @@ void fd4_emit_gmem_restore_tex(struct fd_ringbuffer *ring, unsigned nr_bufs, /* grouped together emit-state for prog/vertex/state emit: */ struct fd4_emit { - struct pipe_debug_callback *debug; + struct util_debug_callback *debug; const struct fd_vertex_state *vtx; const struct fd4_program_state *prog; const struct pipe_draw_info *info; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h index b8ecdc8d9dc..b91d8d0c929 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.h @@ -41,7 +41,7 @@ struct fd_ringbuffer; /* grouped together emit-state for prog/vertex/state emit: */ struct fd5_emit { - struct pipe_debug_callback *debug; + struct util_debug_callback *debug; const struct fd_vertex_state *vtx; const struct fd5_program_state *prog; const struct pipe_draw_info *info; diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index b51d7f2a6e1..c88ed69cf97 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -402,7 +402,7 @@ fd_context_destroy(struct pipe_context *pctx) static void fd_set_debug_callback(struct pipe_context *pctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct fd_context *ctx = fd_context(pctx); diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 6cbd7e6a255..e9c25fde9bd 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -436,7 +436,7 @@ struct fd_context { */ struct ir3_cache *shader_cache; - struct pipe_debug_callback debug; + struct util_debug_callback debug; struct u_trace_context trace_context dt; diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 71653ff5bef..0f82a5414bc 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -120,7 +120,7 @@ extern bool fd_binning_enabled; do { \ if (FD_DBG(PERF)) \ mesa_logw(__VA_ARGS__); \ - struct pipe_debug_callback *__d = (debug); \ + struct util_debug_callback *__d = (debug); \ if (__d) \ util_debug_message(__d, type, __VA_ARGS__); \ } while (0) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cache.c b/src/gallium/drivers/freedreno/ir3/ir3_cache.c index 0ba6a9ca054..8fb9729c7a6 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cache.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cache.c @@ -87,7 +87,7 @@ ir3_cache_destroy(struct ir3_cache *cache) struct ir3_program_state * ir3_cache_lookup(struct ir3_cache *cache, const struct ir3_cache_key *key, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { uint32_t hash = key_hash(key); struct hash_entry *entry = diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cache.h b/src/gallium/drivers/freedreno/ir3/ir3_cache.h index b94ad3b65a3..d4c3487aa89 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cache.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_cache.h @@ -77,7 +77,7 @@ void ir3_cache_destroy(struct ir3_cache *cache); */ struct ir3_program_state *ir3_cache_lookup(struct ir3_cache *cache, const struct ir3_cache_key *key, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); /* call when an API level state object is destroyed, to invalidate * cache entries which reference that state object. diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index 798d60428ff..fbde261b14e 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -75,7 +75,7 @@ initial_variants_synchronous(struct fd_context *ctx) static void dump_shader_info(struct ir3_shader_variant *v, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { if (!FD_DBG(SHADERDB)) return; @@ -119,7 +119,7 @@ upload_shader_variant(struct ir3_shader_variant *v) struct ir3_shader_variant * ir3_shader_variant(struct ir3_shader *shader, struct ir3_shader_key key, - bool binning_pass, struct pipe_debug_callback *debug) + bool binning_pass, struct util_debug_callback *debug) { struct ir3_shader_variant *v; bool created = false; @@ -176,7 +176,7 @@ copy_stream_out(struct ir3_stream_output_info *i, static void create_initial_variants(struct ir3_shader_state *hwcso, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { struct ir3_shader *shader = hwcso->shader; struct ir3_compiler *compiler = shader->compiler; @@ -246,7 +246,7 @@ static void create_initial_variants_async(void *job, void *gdata, int thread_index) { struct ir3_shader_state *hwcso = job; - struct pipe_debug_callback debug = {}; + struct util_debug_callback debug = {}; create_initial_variants(hwcso, &debug); } @@ -256,7 +256,7 @@ create_initial_compute_variants_async(void *job, void *gdata, int thread_index) { struct ir3_shader_state *hwcso = job; struct ir3_shader *shader = hwcso->shader; - struct pipe_debug_callback debug = {}; + struct util_debug_callback debug = {}; static struct ir3_shader_key key; /* static is implicitly zeroed */ ir3_shader_variant(shader, key, false, &debug); diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.h b/src/gallium/drivers/freedreno/ir3/ir3_gallium.h index 9f3011f4bc5..c6a961c13cb 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.h @@ -41,7 +41,7 @@ struct ir3_shader_state; struct ir3_shader_variant * ir3_shader_variant(struct ir3_shader *shader, struct ir3_shader_key key, - bool binning_pass, struct pipe_debug_callback *debug); + bool binning_pass, struct util_debug_callback *debug); void *ir3_shader_compute_state_create(struct pipe_context *pctx, const struct pipe_compute_state *cso); diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 71e9f5defa0..e283a42f279 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -167,7 +167,7 @@ i915_destroy(struct pipe_context *pipe) static void i915_set_debug_callback(struct pipe_context *pipe, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct i915_context *i915 = i915_context(pipe); diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h index 44e7a9bc1d0..2ff659bdb2a 100644 --- a/src/gallium/drivers/i915/i915_context.h +++ b/src/gallium/drivers/i915/i915_context.h @@ -310,7 +310,7 @@ struct i915_context { /** blitter/hw-clear */ struct blitter_context *blitter; - struct pipe_debug_callback debug; + struct util_debug_callback debug; }; /* A flag for each frontend state object: diff --git a/src/gallium/drivers/iris/iris_batch.h b/src/gallium/drivers/iris/iris_batch.h index cf59a2fda9e..7f0179002ab 100644 --- a/src/gallium/drivers/iris/iris_batch.h +++ b/src/gallium/drivers/iris/iris_batch.h @@ -63,7 +63,7 @@ enum iris_batch_name { struct iris_batch { struct iris_context *ice; struct iris_screen *screen; - struct pipe_debug_callback *dbg; + struct util_debug_callback *dbg; struct pipe_device_reset_callback *reset; /** What batch is this? (e.g. IRIS_BATCH_RENDER/COMPUTE) */ diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 6779c40f03e..0fe5e0112a8 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1488,7 +1488,7 @@ iris_bo_unreference(struct iris_bo *bo) } static void -bo_wait_with_stall_warning(struct pipe_debug_callback *dbg, +bo_wait_with_stall_warning(struct util_debug_callback *dbg, struct iris_bo *bo, const char *action) { @@ -1525,7 +1525,7 @@ print_flags(unsigned flags) } static void * -iris_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, struct iris_bo *bo) +iris_bo_gem_mmap_legacy(struct util_debug_callback *dbg, struct iris_bo *bo) { struct iris_bufmgr *bufmgr = bo->bufmgr; @@ -1552,7 +1552,7 @@ iris_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, struct iris_bo *bo) } static void * -iris_bo_gem_mmap_offset(struct pipe_debug_callback *dbg, struct iris_bo *bo) +iris_bo_gem_mmap_offset(struct util_debug_callback *dbg, struct iris_bo *bo) { struct iris_bufmgr *bufmgr = bo->bufmgr; @@ -1612,7 +1612,7 @@ iris_bo_gem_mmap_offset(struct pipe_debug_callback *dbg, struct iris_bo *bo) } void * -iris_bo_map(struct pipe_debug_callback *dbg, +iris_bo_map(struct util_debug_callback *dbg, struct iris_bo *bo, unsigned flags) { struct iris_bufmgr *bufmgr = bo->bufmgr; diff --git a/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h index ba11027a8da..9022cb504a6 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.h +++ b/src/gallium/drivers/iris/iris_bufmgr.h @@ -38,7 +38,7 @@ #include "pipebuffer/pb_slab.h" struct intel_device_info; -struct pipe_debug_callback; +struct util_debug_callback; struct isl_surf; struct iris_syncobj; @@ -331,7 +331,7 @@ void iris_bo_unreference(struct iris_bo *bo); * This function will block waiting for any existing execution on the * buffer to complete, first. The resulting mapping is returned. */ -MUST_CHECK void *iris_bo_map(struct pipe_debug_callback *dbg, +MUST_CHECK void *iris_bo_map(struct util_debug_callback *dbg, struct iris_bo *bo, unsigned flags); /** diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c index 3b45e7342f8..550ff6d1873 100644 --- a/src/gallium/drivers/iris/iris_context.c +++ b/src/gallium/drivers/iris/iris_context.c @@ -42,7 +42,7 @@ */ static void iris_set_debug_callback(struct pipe_context *ctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct iris_context *ice = (struct iris_context *)ctx; struct iris_screen *screen = (struct iris_screen *)ctx->screen; diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index b6b654d3725..f9924f70d66 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -582,7 +582,7 @@ struct iris_context { struct threaded_context *thrctx; /** A debug callback for KHR_debug output. */ - struct pipe_debug_callback dbg; + struct util_debug_callback dbg; /** A device reset status callback for notifying that the GPU is hosed. */ struct pipe_device_reset_callback reset; diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 0a14830aee3..1ea9be793e0 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -58,7 +58,7 @@ struct iris_threaded_compile_job { struct iris_screen *screen; struct u_upload_mgr *uploader; - struct pipe_debug_callback *dbg; + struct util_debug_callback *dbg; struct iris_uncompiled_shader *ish; struct iris_compiled_shader *shader; }; @@ -1105,7 +1105,7 @@ iris_setup_binding_table(const struct intel_device_info *devinfo, static void iris_debug_recompile(struct iris_screen *screen, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, const struct brw_base_prog_key *key) { @@ -1267,7 +1267,7 @@ iris_threaded_compile_job_delete(void *_job, UNUSED void *_gdata, static void iris_schedule_compile(struct iris_screen *screen, struct util_queue_fence *ready_fence, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_threaded_compile_job *job, util_queue_execute_func execute) @@ -1299,7 +1299,7 @@ iris_schedule_compile(struct iris_screen *screen, static void iris_compile_vs(struct iris_screen *screen, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader) { @@ -1479,7 +1479,7 @@ static void iris_compile_tcs(struct iris_screen *screen, struct hash_table *passthrough_ht, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader) { @@ -1668,7 +1668,7 @@ iris_update_compiled_tcs(struct iris_context *ice) static void iris_compile_tes(struct iris_screen *screen, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader) { @@ -1807,7 +1807,7 @@ iris_update_compiled_tes(struct iris_context *ice) static void iris_compile_gs(struct iris_screen *screen, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader) { @@ -1941,7 +1941,7 @@ iris_update_compiled_gs(struct iris_context *ice) static void iris_compile_fs(struct iris_screen *screen, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader, struct brw_vue_map *vue_map) @@ -2234,7 +2234,7 @@ iris_update_compiled_shaders(struct iris_context *ice) static void iris_compile_cs(struct iris_screen *screen, struct u_upload_mgr *uploader, - struct pipe_debug_callback *dbg, + struct util_debug_callback *dbg, struct iris_uncompiled_shader *ish, struct iris_compiled_shader *shader) { @@ -2545,7 +2545,7 @@ iris_compile_shader(void *_job, UNUSED void *_gdata, UNUSED int thread_index) struct iris_screen *screen = job->screen; struct u_upload_mgr *uploader = job->uploader; - struct pipe_debug_callback *dbg = job->dbg; + struct util_debug_callback *dbg = job->dbg; struct iris_uncompiled_shader *ish = job->ish; struct iris_compiled_shader *shader = job->shader; diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h index 78d31ac9f00..bb4330800f4 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -272,7 +272,7 @@ struct iris_surface { */ struct iris_transfer { struct threaded_transfer base; - struct pipe_debug_callback *dbg; + struct util_debug_callback *dbg; void *buffer; void *ptr; diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 29b2b219f3d..7d6e24ad9b2 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -688,7 +688,7 @@ iris_get_default_l3_config(const struct intel_device_info *devinfo, static void iris_shader_debug_log(void *data, unsigned *id, const char *fmt, ...) { - struct pipe_debug_callback *dbg = data; + struct util_debug_callback *dbg = data; va_list args; if (!dbg->debug_message) @@ -702,7 +702,7 @@ iris_shader_debug_log(void *data, unsigned *id, const char *fmt, ...) static void iris_shader_perf_log(void *data, unsigned *id, const char *fmt, ...) { - struct pipe_debug_callback *dbg = data; + struct util_debug_callback *dbg = data; va_list args; va_start(args, fmt); diff --git a/src/gallium/drivers/lima/ir/gp/nir.c b/src/gallium/drivers/lima/ir/gp/nir.c index 5d8abbbe854..32923a98899 100644 --- a/src/gallium/drivers/lima/ir/gp/nir.c +++ b/src/gallium/drivers/lima/ir/gp/nir.c @@ -424,7 +424,7 @@ static int gpir_glsl_type_size(enum glsl_base_type type) } static void gpir_print_shader_db(struct nir_shader *nir, gpir_compiler *comp, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { const struct shader_info *info = &nir->info; char *shaderdb; @@ -445,7 +445,7 @@ static void gpir_print_shader_db(struct nir_shader *nir, gpir_compiler *comp, } bool gpir_compile_nir(struct lima_vs_compiled_shader *prog, struct nir_shader *nir, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { nir_function_impl *func = nir_shader_get_entrypoint(nir); gpir_compiler *comp = gpir_compiler_create(prog, func->reg_alloc, func->ssa_alloc); diff --git a/src/gallium/drivers/lima/ir/lima_ir.h b/src/gallium/drivers/lima/ir/lima_ir.h index 573c745c026..706804fb8d5 100644 --- a/src/gallium/drivers/lima/ir/lima_ir.h +++ b/src/gallium/drivers/lima/ir/lima_ir.h @@ -54,13 +54,13 @@ struct lima_fs_compiled_shader; /* gpir interface */ bool gpir_compile_nir(struct lima_vs_compiled_shader *prog, struct nir_shader *nir, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); /* ppir interface */ bool ppir_compile_nir(struct lima_fs_compiled_shader *prog, struct nir_shader *nir, struct ra_regs *ra, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); struct ra_regs *ppir_regalloc_init(void *mem_ctx); void lima_nir_lower_uniform_to_scalar(nir_shader *shader); diff --git a/src/gallium/drivers/lima/ir/pp/nir.c b/src/gallium/drivers/lima/ir/pp/nir.c index b72336190e6..9812dd6b98b 100644 --- a/src/gallium/drivers/lima/ir/pp/nir.c +++ b/src/gallium/drivers/lima/ir/pp/nir.c @@ -860,7 +860,7 @@ static void ppir_add_ordering_deps(ppir_compiler *comp) } static void ppir_print_shader_db(struct nir_shader *nir, ppir_compiler *comp, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { const struct shader_info *info = &nir->info; char *shaderdb; @@ -906,7 +906,7 @@ static void ppir_add_write_after_read_deps(ppir_compiler *comp) bool ppir_compile_nir(struct lima_fs_compiled_shader *prog, struct nir_shader *nir, struct ra_regs *ra, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { nir_function_impl *func = nir_shader_get_entrypoint(nir); ppir_compiler *comp = ppir_compiler_create(prog, func->reg_alloc, func->ssa_alloc); diff --git a/src/gallium/drivers/lima/lima_context.c b/src/gallium/drivers/lima/lima_context.c index e14f5ae0fb1..f9d423a31fb 100644 --- a/src/gallium/drivers/lima/lima_context.c +++ b/src/gallium/drivers/lima/lima_context.c @@ -189,7 +189,7 @@ plb_pp_stream_compare(const void *key1, const void *key2) static void lima_set_debug_callback(struct pipe_context *pctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct lima_context *ctx = lima_context(pctx); diff --git a/src/gallium/drivers/lima/lima_context.h b/src/gallium/drivers/lima/lima_context.h index 3adf67ce3c4..6a37bfa3a98 100644 --- a/src/gallium/drivers/lima/lima_context.h +++ b/src/gallium/drivers/lima/lima_context.h @@ -275,7 +275,7 @@ struct lima_context { int id; - struct pipe_debug_callback debug; + struct util_debug_callback debug; unsigned index_offset; struct lima_resource *index_res; diff --git a/src/gallium/drivers/nouveau/nouveau_context.h b/src/gallium/drivers/nouveau/nouveau_context.h index c3bbb11bd60..3d4af8d765c 100644 --- a/src/gallium/drivers/nouveau/nouveau_context.h +++ b/src/gallium/drivers/nouveau/nouveau_context.h @@ -15,7 +15,7 @@ struct nouveau_context { struct nouveau_client *client; struct nouveau_pushbuf *pushbuf; - struct pipe_debug_callback debug; + struct util_debug_callback debug; bool vbo_dirty; diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index 5ae45348265..345ef5f66f2 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -204,7 +204,7 @@ nouveau_fence_kick(struct nouveau_fence *fence) } bool -nouveau_fence_wait(struct nouveau_fence *fence, struct pipe_debug_callback *debug) +nouveau_fence_wait(struct nouveau_fence *fence, struct util_debug_callback *debug) { struct nouveau_screen *screen = fence->screen; uint32_t spins = 0; diff --git a/src/gallium/drivers/nouveau/nouveau_fence.h b/src/gallium/drivers/nouveau/nouveau_fence.h index 72a5496cb19..129939f0167 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.h +++ b/src/gallium/drivers/nouveau/nouveau_fence.h @@ -11,7 +11,7 @@ #define NOUVEAU_FENCE_STATE_FLUSHED 3 #define NOUVEAU_FENCE_STATE_SIGNALLED 4 -struct pipe_debug_callback; +struct util_debug_callback; struct nouveau_fence_work { struct list_head list; @@ -37,7 +37,7 @@ void nouveau_fence_cleanup(struct nouveau_screen *); bool nouveau_fence_work(struct nouveau_fence *, void (*)(void *), void *); void nouveau_fence_update(struct nouveau_screen *, bool flushed); void nouveau_fence_next(struct nouveau_screen *); -bool nouveau_fence_wait(struct nouveau_fence *, struct pipe_debug_callback *); +bool nouveau_fence_wait(struct nouveau_fence *, struct util_debug_callback *); bool nouveau_fence_signalled(struct nouveau_fence *); void nouveau_fence_unref_bo(void *data); /* generic unref bo callback */ diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 2f6eb80d494..6c9781063fe 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -383,7 +383,7 @@ nouveau_screen_fini(struct nouveau_screen *screen) static void nouveau_set_debug_callback(struct pipe_context *pipe, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct nouveau_context *context = nouveau_context(pipe); diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers/nouveau/nv50/nv50_program.c index b2e98720ac1..60081c665fe 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_program.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_program.c @@ -323,7 +323,7 @@ nv50_program_create_strmout_state(const struct nv50_ir_prog_info_out *info, bool nv50_program_translate(struct nv50_program *prog, uint16_t chipset, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { struct nv50_ir_prog_info *info; struct nv50_ir_prog_info_out info_out = {}; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.h b/src/gallium/drivers/nouveau/nv50/nv50_program.h index 1a79ce4b387..874d5e4e777 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_program.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_program.h @@ -123,7 +123,7 @@ struct nv50_program { }; bool nv50_program_translate(struct nv50_program *, uint16_t chipset, - struct pipe_debug_callback *); + struct util_debug_callback *); bool nv50_program_upload_code(struct nv50_context *, struct nv50_program *); void nv50_program_destroy(struct nv50_context *, struct nv50_program *); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 0ad06db7984..2d8e2f0b38a 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -324,7 +324,7 @@ extern struct draw_stage *nvc0_draw_render_stage(struct nvc0_context *); /* nvc0_program.c */ bool nvc0_program_translate(struct nvc0_program *, uint16_t chipset, struct disk_cache *, - struct pipe_debug_callback *); + struct util_debug_callback *); bool nvc0_program_upload(struct nvc0_context *, struct nvc0_program *); void nvc0_program_destroy(struct nvc0_context *, struct nvc0_program *); void nvc0_program_library_upload(struct nvc0_context *); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c index 85033989932..93b972a0725 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c @@ -572,7 +572,7 @@ nvc0_program_dump(struct nvc0_program *prog) bool nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset, struct disk_cache *disk_shader_cache, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { struct blob blob; size_t cache_size; diff --git a/src/gallium/drivers/r300/compiler/radeon_compiler.h b/src/gallium/drivers/r300/compiler/radeon_compiler.h index 3e6029fcad7..682ead1cdc8 100644 --- a/src/gallium/drivers/r300/compiler/radeon_compiler.h +++ b/src/gallium/drivers/r300/compiler/radeon_compiler.h @@ -43,7 +43,7 @@ struct radeon_compiler { struct memory_pool Pool; struct rc_program Program; const struct rc_regalloc_state *regalloc_state; - struct pipe_debug_callback *debug; + struct util_debug_callback *debug; enum rc_program_type type; unsigned Debug:2; unsigned Error:1; diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 3acc55d312a..7d7541d7c73 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -370,7 +370,7 @@ static void r300_init_states(struct pipe_context *pipe) static void r300_set_debug_callback(struct pipe_context *context, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct r300_context *r300 = r300_context(context); diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 1657c577395..60016a3a01f 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -547,7 +547,7 @@ struct r300_context { /* Occlusion query. */ struct r300_atom query_start; - struct pipe_debug_callback debug; + struct util_debug_callback debug; /* The pointers to the first and the last atom. */ struct r300_atom *first_dirty, *last_dirty; diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index 441ba426eb8..6801bd9f996 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -492,7 +492,7 @@ static enum pipe_reset_status r600_get_reset_status(struct pipe_context *ctx) } static void r600_set_debug_callback(struct pipe_context *ctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct r600_common_context *rctx = (struct r600_common_context *)ctx; diff --git a/src/gallium/drivers/r600/r600_pipe_common.h b/src/gallium/drivers/r600/r600_pipe_common.h index 286b71195c9..4d1c5e84dab 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.h +++ b/src/gallium/drivers/r600/r600_pipe_common.h @@ -565,7 +565,7 @@ struct r600_common_context { float sample_locations_8x[8][2]; float sample_locations_16x[16][2]; - struct pipe_debug_callback debug; + struct util_debug_callback debug; struct pipe_device_reset_callback device_reset_callback; struct u_log_context *log; diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 56b66d1bae4..72ef90fbdce 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -113,7 +113,7 @@ static void si_create_compute_state_async(void *job, void *gdata, int thread_ind struct si_shader_selector *sel = &program->sel; struct si_shader *shader = &program->shader; struct ac_llvm_compiler *compiler; - struct pipe_debug_callback *debug = &sel->compiler_ctx_state.debug; + struct util_debug_callback *debug = &sel->compiler_ctx_state.debug; struct si_screen *sscreen = sel->screen; assert(!debug->debug_message || debug->async); diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 3cfbfc042d2..1bd1b9f6c19 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -404,7 +404,7 @@ static void si_emit_string_marker(struct pipe_context *ctx, const char *string, u_log_printf(sctx->log, "\nString marker: %*s\n", len, string); } -static void si_set_debug_callback(struct pipe_context *ctx, const struct pipe_debug_callback *cb) +static void si_set_debug_callback(struct pipe_context *ctx, const struct util_debug_callback *cb) { struct si_context *sctx = (struct si_context *)ctx; struct si_screen *screen = sctx->screen; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index fd484e3944a..18ab5a7bd2a 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -978,7 +978,7 @@ struct si_context { void *cs_dcc_retile[32]; void *cs_fmask_expand[3][2]; /* [log2(samples)-1][is_array] */ struct si_screen *screen; - struct pipe_debug_callback debug; + struct util_debug_callback debug; struct ac_llvm_compiler compiler; /* only non-threaded compilation */ struct si_shader_ctx_state fixed_func_tcs_shader; /* Offset 0: EOP flush number; Offset 4: GDS prim restart counter */ diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b0731ef3394..30042633f62 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -912,7 +912,7 @@ bool si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader static void si_shader_dump_disassembly(struct si_screen *screen, const struct si_shader_binary *binary, gl_shader_stage stage, unsigned wave_size, - struct pipe_debug_callback *debug, const char *name, + struct util_debug_callback *debug, const char *name, FILE *file) { struct ac_rtld_binary rtld_binary; @@ -1025,7 +1025,7 @@ static void si_calculate_max_simd_waves(struct si_shader *shader) } void si_shader_dump_stats_for_shader_db(struct si_screen *screen, struct si_shader *shader, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { const struct ac_shader_config *conf = &shader->config; static const char *stages[] = {"VS", "TCS", "TES", "GS", "PS", "CS"}; @@ -1116,7 +1116,7 @@ const char *si_get_shader_name(const struct si_shader *shader) } void si_shader_dump(struct si_screen *sscreen, struct si_shader *shader, - struct pipe_debug_callback *debug, FILE *file, bool check_debug_option) + struct util_debug_callback *debug, FILE *file, bool check_debug_option) { gl_shader_stage stage = shader->selector->info.stage; @@ -1498,7 +1498,7 @@ void si_update_shader_binary_info(struct si_shader *shader, nir_shader *nir) } bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { struct si_shader_selector *sel = shader->selector; bool free_nir; @@ -1636,7 +1636,7 @@ bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compi static struct si_shader_part * si_get_shader_part(struct si_screen *sscreen, struct si_shader_part **list, gl_shader_stage stage, bool prolog, union si_shader_part_key *key, - struct ac_llvm_compiler *compiler, struct pipe_debug_callback *debug, + struct ac_llvm_compiler *compiler, struct util_debug_callback *debug, void (*build)(struct si_shader_context *, union si_shader_part_key *), const char *name) { @@ -1716,7 +1716,7 @@ out: } static bool si_get_vs_prolog(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug, + struct si_shader *shader, struct util_debug_callback *debug, struct si_shader *main_part, const struct si_vs_prolog_bits *key) { struct si_shader_selector *vs = main_part->selector; @@ -1740,7 +1740,7 @@ static bool si_get_vs_prolog(struct si_screen *sscreen, struct ac_llvm_compiler * Select and compile (or reuse) vertex shader parts (prolog & epilog). */ static bool si_shader_select_vs_parts(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { return si_get_vs_prolog(sscreen, compiler, shader, debug, shader, &shader->key.ge.part.vs.prolog); } @@ -1749,7 +1749,7 @@ static bool si_shader_select_vs_parts(struct si_screen *sscreen, struct ac_llvm_ * Select and compile (or reuse) TCS parts (epilog). */ static bool si_shader_select_tcs_parts(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { if (sscreen->info.chip_class >= GFX9) { struct si_shader *ls_main_part = shader->key.ge.part.tcs.ls->main_shader_part_ls; @@ -1777,7 +1777,7 @@ static bool si_shader_select_tcs_parts(struct si_screen *sscreen, struct ac_llvm * Select and compile (or reuse) GS parts (prolog). */ static bool si_shader_select_gs_parts(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { if (sscreen->info.chip_class >= GFX9) { struct si_shader *es_main_part; @@ -1960,7 +1960,7 @@ void si_get_ps_epilog_key(struct si_shader *shader, union si_shader_part_key *ke * Select and compile (or reuse) pixel shader parts (prolog & epilog). */ static bool si_shader_select_ps_parts(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { union si_shader_part_key prolog_key; union si_shader_part_key epilog_key; @@ -2072,7 +2072,7 @@ void si_fix_resource_usage(struct si_screen *sscreen, struct si_shader *shader) } bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug) + struct si_shader *shader, struct util_debug_callback *debug) { struct si_shader_selector *sel = shader->selector; struct si_shader *mainp = *si_get_main_shader_part(sel, &shader->key); diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 5e8314caa7b..577e822bc0c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -324,7 +324,7 @@ struct si_compiler_ctx_state { struct ac_llvm_compiler *compiler; /* Used if thread_index == -1 or if debug.async is true. */ - struct pipe_debug_callback debug; + struct util_debug_callback debug; /* Used for creating the log string for gallium/ddebug. */ bool is_debug_context; @@ -936,18 +936,18 @@ struct si_shader_part { /* si_shader.c */ void si_update_shader_binary_info(struct si_shader *shader, nir_shader *nir); bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug); + struct si_shader *shader, struct util_debug_callback *debug); bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug); + struct si_shader *shader, struct util_debug_callback *debug); void si_shader_destroy(struct si_shader *shader); unsigned si_shader_io_get_unique_index_patch(unsigned semantic); unsigned si_shader_io_get_unique_index(unsigned semantic, bool is_varying); bool si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader, uint64_t scratch_va); void si_shader_dump(struct si_screen *sscreen, struct si_shader *shader, - struct pipe_debug_callback *debug, FILE *f, bool check_debug_option); + struct util_debug_callback *debug, FILE *f, bool check_debug_option); void si_shader_dump_stats_for_shader_db(struct si_screen *screen, struct si_shader *shader, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); void si_multiwave_lds_size_workaround(struct si_screen *sscreen, unsigned *lds_size); const char *si_get_shader_name(const struct si_shader *shader); void si_shader_binary_clean(struct si_shader_binary *binary); @@ -959,7 +959,7 @@ void si_nir_scan_shader(const struct nir_shader *nir, struct si_shader_info *inf struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, struct si_shader_selector *gs_selector, - struct pipe_debug_callback *debug); + struct util_debug_callback *debug); /* si_shader_nir.c */ void si_nir_opts(struct si_screen *sscreen, struct nir_shader *nir, bool first); diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 70f23d88eca..103d78a9c52 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -28,7 +28,7 @@ #include "ac_shader_abi.h" #include "si_shader.h" -struct pipe_debug_callback; +struct util_debug_callback; struct si_shader_output_values { LLVMValueRef values[4]; @@ -196,7 +196,7 @@ bool gfx10_ngg_calculate_subgroup_info(struct si_shader *shader); /* si_shader_llvm.c */ bool si_compile_llvm(struct si_screen *sscreen, struct si_shader_binary *binary, struct ac_shader_config *conf, struct ac_llvm_compiler *compiler, - struct ac_llvm_context *ac, struct pipe_debug_callback *debug, + struct ac_llvm_context *ac, struct util_debug_callback *debug, gl_shader_stage stage, const char *name, bool less_optimized); void si_llvm_context_init(struct si_shader_context *ctx, struct si_screen *sscreen, struct ac_llvm_compiler *compiler, unsigned wave_size); @@ -226,7 +226,7 @@ void si_build_wrapper_function(struct si_shader_context *ctx, LLVMValueRef *part bool si_llvm_translate_nir(struct si_shader_context *ctx, struct si_shader *shader, struct nir_shader *nir, bool free_nir, bool ngg_cull_shader); bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug, + struct si_shader *shader, struct util_debug_callback *debug, struct nir_shader *nir, bool free_nir); /* si_shader_llvm_gs.c */ diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm.c b/src/gallium/drivers/radeonsi/si_shader_llvm.c index 4acfef3347f..e8546d1748d 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm.c @@ -32,7 +32,7 @@ #include "util/u_memory.h" struct si_llvm_diagnostics { - struct pipe_debug_callback *debug; + struct util_debug_callback *debug; unsigned retval; }; @@ -70,7 +70,7 @@ static void si_diagnostic_handler(LLVMDiagnosticInfoRef di, void *context) bool si_compile_llvm(struct si_screen *sscreen, struct si_shader_binary *binary, struct ac_shader_config *conf, struct ac_llvm_compiler *compiler, - struct ac_llvm_context *ac, struct pipe_debug_callback *debug, + struct ac_llvm_context *ac, struct util_debug_callback *debug, gl_shader_stage stage, const char *name, bool less_optimized) { unsigned count = p_atomic_inc_return(&sscreen->num_compilations); @@ -1087,7 +1087,7 @@ static void si_optimize_vs_outputs(struct si_shader_context *ctx) } bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, - struct si_shader *shader, struct pipe_debug_callback *debug, + struct si_shader *shader, struct util_debug_callback *debug, struct nir_shader *nir, bool free_nir) { struct si_shader_selector *sel = shader->selector; diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c index 5a980a59319..3dfc56269f1 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c @@ -422,7 +422,7 @@ void si_preload_gs_rings(struct si_shader_context *ctx) struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler, struct si_shader_selector *gs_selector, - struct pipe_debug_callback *debug) + struct util_debug_callback *debug) { struct si_shader_context ctx; struct si_shader *shader; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 49f53885105..8579a2135f6 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -2375,7 +2375,7 @@ static void si_build_shader_variant(struct si_shader *shader, int thread_index, struct si_shader_selector *sel = shader->selector; struct si_screen *sscreen = sel->screen; struct ac_llvm_compiler *compiler; - struct pipe_debug_callback *debug = &shader->compiler_ctx_state.debug; + struct util_debug_callback *debug = &shader->compiler_ctx_state.debug; if (thread_index >= 0) { if (low_priority) { @@ -2825,7 +2825,7 @@ static void si_init_shader_selector_async(void *job, void *gdata, int thread_ind struct si_shader_selector *sel = (struct si_shader_selector *)job; struct si_screen *sscreen = sel->screen; struct ac_llvm_compiler *compiler; - struct pipe_debug_callback *debug = &sel->compiler_ctx_state.debug; + struct util_debug_callback *debug = &sel->compiler_ctx_state.debug; assert(!debug->debug_message || debug->async); assert(thread_index >= 0); diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 1f6e11819df..ddee6a8926a 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -181,7 +181,7 @@ softpipe_render_condition(struct pipe_context *pipe, static void softpipe_set_debug_callback(struct pipe_context *pipe, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct softpipe_context *softpipe = softpipe_context(pipe); diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 7a820fb1d47..4e0d87856b5 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -189,7 +189,7 @@ struct softpipe_context { */ struct softpipe_tex_tile_cache *tex_cache[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_SAMPLER_VIEWS]; - struct pipe_debug_callback debug; + struct util_debug_callback debug; }; diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index 0a505b3c62e..0227d64cf69 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -591,7 +591,7 @@ struct svga_context boolean force_hw_line_stipple; /** To report perf/conformance/etc issues to the gallium frontend */ - struct pipe_debug_callback callback; + struct util_debug_callback callback; } debug; struct { diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c index 61b4897c5d6..f4ed782cda2 100644 --- a/src/gallium/drivers/svga/svga_pipe_misc.c +++ b/src/gallium/drivers/svga/svga_pipe_misc.c @@ -225,7 +225,7 @@ svga_set_viewport_states(struct pipe_context *pipe, */ static void svga_set_debug_callback(struct pipe_context *pipe, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct svga_context *svga = svga_context(pipe); diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index df2b5601b3a..362bbf637a4 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -479,7 +479,7 @@ struct svga_shader_emitter_v10 bool register_overflow; /**< Set if we exceed a VGPU10 register limit */ /* For util_debug_message */ - struct pipe_debug_callback svga_debug_callback; + struct util_debug_callback svga_debug_callback; /* current loop depth in shader */ unsigned current_loop_depth; diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index 5b4c687f85c..7e05b811e3a 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -49,7 +49,7 @@ struct svga_winsys_screen; struct svga_winsys_buffer; struct pipe_screen; struct pipe_context; -struct pipe_debug_callback; +struct util_debug_callback; struct pipe_fence_handle; struct pipe_resource; struct svga_region; @@ -477,7 +477,7 @@ struct svga_winsys_context unsigned flags); /** To report perf/conformance/etc issues to the gallium frontend */ - struct pipe_debug_callback *debug_callback; + struct util_debug_callback *debug_callback; /** The more recent command issued to command buffer */ SVGAFifo3dCmdId last_command; diff --git a/src/gallium/drivers/tegra/tegra_context.c b/src/gallium/drivers/tegra/tegra_context.c index 405e67c1478..6c81e1509da 100644 --- a/src/gallium/drivers/tegra/tegra_context.c +++ b/src/gallium/drivers/tegra/tegra_context.c @@ -602,7 +602,7 @@ tegra_set_tess_state(struct pipe_context *pcontext, static void tegra_set_debug_callback(struct pipe_context *pcontext, - const struct pipe_debug_callback *callback) + const struct util_debug_callback *callback) { struct tegra_context *context = to_tegra_context(pcontext); diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index a35bd3666cd..c7c6134461d 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -88,7 +88,7 @@ v3d_memory_barrier(struct pipe_context *pctx, unsigned int flags) static void v3d_set_debug_callback(struct pipe_context *pctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct v3d_context *v3d = v3d_context(pctx); diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 1bdb41f46c0..d8c2191074e 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -600,7 +600,7 @@ struct v3d_context { struct v3d_bo *current_oq; struct pipe_resource *prim_counts; uint32_t prim_counts_offset; - struct pipe_debug_callback debug; + struct util_debug_callback debug; struct v3d_perfmon_state *active_perfmon; struct v3d_perfmon_state *last_perfmon; /** @} */ diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index 75d82f3e3a7..531416ca3f6 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -85,7 +85,7 @@ vc4_texture_barrier(struct pipe_context *pctx, unsigned flags) static void vc4_set_debug_callback(struct pipe_context *pctx, - const struct pipe_debug_callback *cb) + const struct util_debug_callback *cb) { struct vc4_context *vc4 = vc4_context(pctx); diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h index 02813f8fccf..a55f808a7f6 100644 --- a/src/gallium/drivers/vc4/vc4_context.h +++ b/src/gallium/drivers/vc4/vc4_context.h @@ -381,7 +381,7 @@ struct vc4_context { struct pipe_viewport_state viewport; struct vc4_constbuf_stateobj constbuf[PIPE_SHADER_TYPES]; struct vc4_vertexbuf_stateobj vertexbuf; - struct pipe_debug_callback debug; + struct util_debug_callback debug; struct vc4_hwperfmon *perfmon; /** @} */ diff --git a/src/gallium/frontends/clover/core/queue.cpp b/src/gallium/frontends/clover/core/queue.cpp index a81ef3ab42f..b4a4b95babc 100644 --- a/src/gallium/frontends/clover/core/queue.cpp +++ b/src/gallium/frontends/clover/core/queue.cpp @@ -50,7 +50,7 @@ command_queue::command_queue(clover::context &ctx, clover::device &dev, throw error(CL_INVALID_DEVICE); if (ctx.notify) { - struct pipe_debug_callback cb; + struct util_debug_callback cb; memset(&cb, 0, sizeof(cb)); cb.debug_message = &debug_notify_callback; cb.data = this; @@ -76,7 +76,7 @@ command_queue::command_queue(clover::context &ctx, clover::device &dev, throw error(CL_INVALID_DEVICE); if (ctx.notify) { - struct pipe_debug_callback cb; + struct util_debug_callback cb; memset(&cb, 0, sizeof(cb)); cb.debug_message = &debug_notify_callback; cb.data = this; diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index b4db1581f68..b655d692838 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -45,7 +45,7 @@ struct pipe_blit_info; struct pipe_box; struct pipe_clip_state; struct pipe_constant_buffer; -struct pipe_debug_callback; +struct util_debug_callback; struct pipe_depth_stencil_alpha_state; struct pipe_device_reset_callback; struct pipe_draw_info; @@ -521,7 +521,7 @@ struct pipe_context { * set, otherwise a copy of the data should be made. */ void (*set_debug_callback)(struct pipe_context *, - const struct pipe_debug_callback *); + const struct util_debug_callback *); /** * Bind an array of shader buffers that will be used by a shader. diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 2a7eaf1ac9e..8cf8f8c1337 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -1004,7 +1004,7 @@ struct pipe_compute_state * Structure that contains a callback for debug messages from the driver back * to the gallium frontend. */ -struct pipe_debug_callback +struct util_debug_callback { /** * When set to \c true, the callback may be called asynchronously from a diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c index 4ee0ac44724..3e7ed848352 100644 --- a/src/mesa/main/debug_output.c +++ b/src/mesa/main/debug_output.c @@ -682,7 +682,7 @@ debug_pop_group(struct gl_debug_state *debug) /** - * Installed as pipe_debug_callback when GL_DEBUG_OUTPUT is enabled. + * Installed as util_debug_callback when GL_DEBUG_OUTPUT is enabled. */ static void _debug_message(void *data, @@ -747,7 +747,7 @@ _mesa_update_debug_callback(struct gl_context *ctx) return; if (_mesa_get_debug_state_int(ctx, GL_DEBUG_OUTPUT)) { - struct pipe_debug_callback cb; + struct util_debug_callback cb; memset(&cb, 0, sizeof(cb)); cb.async = !_mesa_get_debug_state_int(ctx, GL_DEBUG_OUTPUT_SYNCHRONOUS); cb.debug_message = _debug_message; diff --git a/src/util/u_debug.c b/src/util/u_debug.c index 0ae2f68d5f7..bff72549bba 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -66,7 +66,7 @@ _debug_vprintf(const char *format, va_list ap) void -_util_debug_message(struct pipe_debug_callback *cb, +_util_debug_message(struct util_debug_callback *cb, unsigned *id, enum pipe_debug_type type, const char *fmt, ...) diff --git a/src/util/u_debug.h b/src/util/u_debug.h index 33f66de18af..f907e01f12b 100644 --- a/src/util/u_debug.h +++ b/src/util/u_debug.h @@ -275,11 +275,11 @@ void _debug_assert_fail(const char *expr, } \ } while (0) -struct pipe_debug_callback; +struct util_debug_callback; void _util_debug_message( - struct pipe_debug_callback *cb, + struct util_debug_callback *cb, unsigned *id, enum pipe_debug_type type, const char *fmt, ...) _util_printf_format(4, 5);