vc4: Use u_default_set_debug_callback
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18351>
This commit is contained in:

committed by
Marge Bot

parent
e9b54e1000
commit
ad5f0592cc
@@ -83,18 +83,6 @@ vc4_texture_barrier(struct pipe_context *pctx, unsigned flags)
|
||||
vc4_flush(pctx);
|
||||
}
|
||||
|
||||
static void
|
||||
vc4_set_debug_callback(struct pipe_context *pctx,
|
||||
const struct util_debug_callback *cb)
|
||||
{
|
||||
struct vc4_context *vc4 = vc4_context(pctx);
|
||||
|
||||
if (cb)
|
||||
vc4->debug = *cb;
|
||||
else
|
||||
memset(&vc4->debug, 0, sizeof(vc4->debug));
|
||||
}
|
||||
|
||||
static void
|
||||
vc4_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
|
||||
{
|
||||
@@ -172,7 +160,7 @@ vc4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
pctx->priv = priv;
|
||||
pctx->destroy = vc4_context_destroy;
|
||||
pctx->flush = vc4_pipe_flush;
|
||||
pctx->set_debug_callback = vc4_set_debug_callback;
|
||||
pctx->set_debug_callback = u_default_set_debug_callback;
|
||||
pctx->invalidate_resource = vc4_invalidate_resource;
|
||||
pctx->texture_barrier = vc4_texture_barrier;
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "util/slab.h"
|
||||
#include "util/u_debug_cb.h"
|
||||
#include "xf86drm.h"
|
||||
|
||||
#define __user
|
||||
@@ -381,7 +382,6 @@ struct vc4_context {
|
||||
struct pipe_viewport_state viewport;
|
||||
struct vc4_constbuf_stateobj constbuf[PIPE_SHADER_TYPES];
|
||||
struct vc4_vertexbuf_stateobj vertexbuf;
|
||||
struct util_debug_callback debug;
|
||||
|
||||
struct vc4_hwperfmon *perfmon;
|
||||
/** @} */
|
||||
@@ -428,8 +428,8 @@ struct vc4_depth_stencil_alpha_state {
|
||||
#define perf_debug(...) do { \
|
||||
if (VC4_DBG(PERF)) \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
if (unlikely(vc4->debug.debug_message)) \
|
||||
util_debug_message(&vc4->debug, PERF_INFO, __VA_ARGS__); \
|
||||
if (unlikely(vc4->base.debug.debug_message)) \
|
||||
util_debug_message(&vc4->base.debug, PERF_INFO, __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
static inline struct vc4_context *
|
||||
|
Reference in New Issue
Block a user