r300: Use u_default_set_debug_callback
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18351>
This commit is contained in:

committed by
Marge Bot

parent
a7aa8fbf7a
commit
70e269ac6f
@@ -25,6 +25,7 @@
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_sampler.h"
|
||||
#include "util/u_upload_mgr.h"
|
||||
#include "util/u_debug_cb.h"
|
||||
#include "util/os_time.h"
|
||||
#include "vl/vl_decoder.h"
|
||||
#include "vl/vl_video_buffer.h"
|
||||
@@ -367,18 +368,6 @@ static void r300_init_states(struct pipe_context *pipe)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
r300_set_debug_callback(struct pipe_context *context,
|
||||
const struct util_debug_callback *cb)
|
||||
{
|
||||
struct r300_context *r300 = r300_context(context);
|
||||
|
||||
if (cb)
|
||||
r300->debug = *cb;
|
||||
else
|
||||
memset(&r300->debug, 0, sizeof(r300->debug));
|
||||
}
|
||||
|
||||
struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||
void *priv, unsigned flags)
|
||||
{
|
||||
@@ -394,7 +383,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||
|
||||
r300->context.screen = screen;
|
||||
r300->context.priv = priv;
|
||||
r300->context.set_debug_callback = r300_set_debug_callback;
|
||||
r300->context.set_debug_callback = u_default_set_debug_callback;
|
||||
|
||||
r300->context.destroy = r300_destroy_context;
|
||||
|
||||
|
@@ -547,8 +547,6 @@ struct r300_context {
|
||||
/* Occlusion query. */
|
||||
struct r300_atom query_start;
|
||||
|
||||
struct util_debug_callback debug;
|
||||
|
||||
/* The pointers to the first and the last atom. */
|
||||
struct r300_atom *first_dirty, *last_dirty;
|
||||
|
||||
|
@@ -432,7 +432,7 @@ static void r300_translate_fragment_shader(
|
||||
compiler.code = &shader->code;
|
||||
compiler.state = shader->compare_state;
|
||||
if (!shader->dummy)
|
||||
compiler.Base.debug = &r300->debug;
|
||||
compiler.Base.debug = &r300->context.debug;
|
||||
compiler.Base.is_r500 = r300->screen->caps.is_r500;
|
||||
compiler.Base.is_r400 = r300->screen->caps.is_r400;
|
||||
compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT);
|
||||
|
@@ -195,7 +195,7 @@ void r300_translate_vertex_shader(struct r300_context *r300,
|
||||
DBG_ON(r300, DBG_VP) ? compiler.Base.Debug |= RC_DBG_LOG : 0;
|
||||
compiler.code = &vs->code;
|
||||
compiler.UserData = vs;
|
||||
compiler.Base.debug = &r300->debug;
|
||||
compiler.Base.debug = &r300->context.debug;
|
||||
compiler.Base.is_r500 = r300->screen->caps.is_r500;
|
||||
compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT);
|
||||
compiler.Base.has_half_swizzles = FALSE;
|
||||
|
Reference in New Issue
Block a user