mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
lima: Use u_default_set_debug_callback
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18351>
This commit is contained in:
parent
741c8d8c77
commit
161e35e156
3 changed files with 4 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -280,8 +280,6 @@ struct lima_context {
|
|||
|
||||
int id;
|
||||
|
||||
struct util_debug_callback debug;
|
||||
|
||||
unsigned index_offset;
|
||||
struct lima_resource *index_res;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue