aux/trace: delete surface object hooks

should never be used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
This commit is contained in:
Mike Blumenkrantz 2025-05-30 13:34:44 -04:00 committed by Marge Bot
parent 0100e44a8c
commit bbc4a2d2d9
6 changed files with 0 additions and 169 deletions

View file

@ -71,26 +71,6 @@ trace_query_unwrap(struct pipe_query *query)
}
}
static inline struct pipe_surface *
trace_surface_unwrap(struct trace_context *tr_ctx,
struct pipe_surface *surface)
{
struct trace_surface *tr_surf;
if (!surface)
return NULL;
assert(surface->texture);
if (!surface->texture)
return surface;
tr_surf = trace_surface(surface);
assert(tr_surf->surface);
return tr_surf->surface;
}
static void
dump_fb_state(struct trace_context *tr_ctx,
const char *method,
@ -1174,56 +1154,6 @@ trace_context_sampler_view_release(struct pipe_context *_pipe,
*/
static struct pipe_surface *
trace_context_create_surface(struct pipe_context *_pipe,
struct pipe_resource *resource,
const struct pipe_surface *surf_tmpl)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
struct pipe_surface *result = NULL;
trace_dump_call_begin("pipe_context", "create_surface");
trace_dump_arg(ptr, pipe);
trace_dump_arg(ptr, resource);
trace_dump_arg_begin("surf_tmpl");
trace_dump_surface_template(surf_tmpl, resource->target);
trace_dump_arg_end();
result = pipe->create_surface(pipe, resource, surf_tmpl);
trace_dump_ret(ptr, result);
trace_dump_call_end();
result = trace_surf_create(tr_ctx, resource, result);
return result;
}
static void
trace_context_surface_destroy(struct pipe_context *_pipe,
struct pipe_surface *_surface)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
struct trace_surface *tr_surf = trace_surface(_surface);
struct pipe_surface *surface = tr_surf->surface;
trace_dump_call_begin("pipe_context", "surface_destroy");
trace_dump_arg(ptr, pipe);
trace_dump_arg(ptr, surface);
trace_dump_call_end();
trace_surf_destroy(tr_surf);
}
static void
trace_context_set_sampler_views(struct pipe_context *_pipe,
@ -1490,8 +1420,6 @@ trace_context_clear_render_target(struct pipe_context *_pipe,
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
dst = trace_surface_unwrap(tr_ctx, dst);
trace_dump_call_begin("pipe_context", "clear_render_target");
trace_dump_arg(ptr, pipe);
@ -1522,8 +1450,6 @@ trace_context_clear_depth_stencil(struct pipe_context *_pipe,
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
dst = trace_surface_unwrap(tr_ctx, dst);
trace_dump_call_begin("pipe_context", "clear_depth_stencil");
trace_dump_arg(ptr, pipe);
@ -2599,8 +2525,6 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(create_sampler_view);
TR_CTX_INIT(sampler_view_destroy);
TR_CTX_INIT(sampler_view_release);
TR_CTX_INIT(create_surface);
TR_CTX_INIT(surface_destroy);
TR_CTX_INIT(set_vertex_buffers);
TR_CTX_INIT(create_stream_output_target);
TR_CTX_INIT(stream_output_target_destroy);

View file

@ -629,19 +629,6 @@ void trace_dump_ptr(const void *value)
trace_dump_null();
}
void trace_dump_surface_ptr(struct pipe_surface *_surface)
{
if (!dumping)
return;
if (_surface) {
struct trace_surface *tr_surf = trace_surface(_surface);
trace_dump_ptr(tr_surf->surface);
} else {
trace_dump_null();
}
}
void trace_dump_transfer_ptr(struct pipe_transfer *_transfer)
{
if (!dumping)

View file

@ -105,8 +105,6 @@ void trace_dump_member_begin(const char *name);
void trace_dump_member_end(void);
void trace_dump_null(void);
void trace_dump_ptr(const void *value);
/* will turn a wrapped object into the real one and dump ptr */
void trace_dump_surface_ptr(struct pipe_surface *_surface);
void trace_dump_transfer_ptr(struct pipe_transfer *_transfer);
void trace_dump_nir(struct nir_shader *nir);

View file

@ -33,48 +33,6 @@
#include "tr_context.h"
#include "tr_texture.h"
struct pipe_surface *
trace_surf_create(struct trace_context *tr_ctx,
struct pipe_resource *res,
struct pipe_surface *surface)
{
struct trace_surface *tr_surf;
if (!surface)
goto error;
assert(surface->texture == res);
tr_surf = CALLOC_STRUCT(trace_surface);
if (!tr_surf)
goto error;
memcpy(&tr_surf->base, surface, sizeof(struct pipe_surface));
tr_surf->base.context = &tr_ctx->base;
pipe_reference_init(&tr_surf->base.reference, 1);
tr_surf->base.texture = NULL;
pipe_resource_reference(&tr_surf->base.texture, res);
tr_surf->surface = surface;
return &tr_surf->base;
error:
pipe_surface_reference(&surface, NULL);
return NULL;
}
void
trace_surf_destroy(struct trace_surface *tr_surf)
{
pipe_resource_reference(&tr_surf->base.texture, NULL);
pipe_surface_reference(&tr_surf->surface, NULL);
FREE(tr_surf);
}
struct pipe_transfer *
trace_transfer_create(struct trace_context *tr_ctx,
struct pipe_resource *res,

View file

@ -44,16 +44,6 @@ struct tr_list
struct tr_list *prev;
};
struct trace_surface
{
struct pipe_surface base;
struct pipe_surface *surface;
struct tr_list list;
};
struct trace_sampler_view
{
struct pipe_sampler_view base;
@ -75,16 +65,6 @@ struct trace_transfer
void *map;
};
static inline struct trace_surface *
trace_surface(struct pipe_surface *surface)
{
if (!surface)
return NULL;
return (struct trace_surface *)surface;
}
static inline struct trace_sampler_view *
trace_sampler_view(struct pipe_sampler_view *sampler_view)
{
@ -103,14 +83,6 @@ trace_transfer(struct pipe_transfer *transfer)
}
struct pipe_surface *
trace_surf_create(struct trace_context *tr_ctx,
struct pipe_resource *tr_res,
struct pipe_surface *surface);
void
trace_surf_destroy(struct trace_surface *tr_surf);
struct pipe_transfer *
trace_transfer_create(struct trace_context *tr_ctx,
struct pipe_resource *tr_res,

View file

@ -729,14 +729,6 @@ class Context(Dispatcher):
def clear_texture(self, res, level, box, **color):
pass
def create_surface(self, resource, surf_tmpl):
assert resource is not None
surf_tmpl.resource = resource
return surf_tmpl
def surface_destroy(self, surface):
self.interpreter.unregister_object(surface)
def create_query(self, query_type, index):
return query_type