diff --git a/src/gallium/drivers/lima/lima_context.c b/src/gallium/drivers/lima/lima_context.c index e5df74f79a8..1d283d6b95f 100644 --- a/src/gallium/drivers/lima/lima_context.c +++ b/src/gallium/drivers/lima/lima_context.c @@ -29,6 +29,7 @@ #include "util/u_debug.h" #include "util/ralloc.h" #include "util/u_inlines.h" +#include "util/u_debug_cb.h" #include "util/hash_table.h" #include "lima_screen.h" @@ -187,18 +188,6 @@ plb_pp_stream_compare(const void *key1, const void *key2) return memcmp(key1, key2, sizeof(struct lima_ctx_plb_pp_stream_key)) == 0; } -static void -lima_set_debug_callback(struct pipe_context *pctx, - const struct util_debug_callback *cb) -{ - struct lima_context *ctx = lima_context(pctx); - - if (cb) - ctx->debug = *cb; - else - memset(&ctx->debug, 0, sizeof(ctx->debug)); -} - struct pipe_context * lima_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) { @@ -219,7 +208,7 @@ lima_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) ctx->base.screen = pscreen; ctx->base.destroy = lima_context_destroy; - ctx->base.set_debug_callback = lima_set_debug_callback; + ctx->base.set_debug_callback = u_default_set_debug_callback; ctx->base.invalidate_resource = lima_invalidate_resource; lima_resource_context_init(ctx); diff --git a/src/gallium/drivers/lima/lima_context.h b/src/gallium/drivers/lima/lima_context.h index 772732a0c93..cd753660623 100644 --- a/src/gallium/drivers/lima/lima_context.h +++ b/src/gallium/drivers/lima/lima_context.h @@ -280,8 +280,6 @@ struct lima_context { int id; - struct util_debug_callback debug; - unsigned index_offset; struct lima_resource *index_res; }; diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 1b50ea7a697..0c6b3c0f550 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -311,7 +311,7 @@ lima_fs_compile_shader(struct lima_context *ctx, if (lima_debug & LIMA_DEBUG_PP) nir_print_shader(nir, stdout); - if (!ppir_compile_nir(fs, nir, screen->pp_ra, &ctx->debug)) { + if (!ppir_compile_nir(fs, nir, screen->pp_ra, &ctx->base.debug)) { ralloc_free(nir); return false; } @@ -487,7 +487,7 @@ lima_vs_compile_shader(struct lima_context *ctx, if (lima_debug & LIMA_DEBUG_GP) nir_print_shader(nir, stdout); - if (!gpir_compile_nir(vs, nir, &ctx->debug)) { + if (!gpir_compile_nir(vs, nir, &ctx->base.debug)) { ralloc_free(nir); return false; }