From f4aab9984bfd538d4bcf47fc495c9ace6e996923 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 4 Sep 2024 11:35:25 -0400 Subject: [PATCH] gallium: delete pipe_screen::is_compression_modifier this is unused Reviewed-by: Dave Airlie Part-of: --- src/gallium/auxiliary/driver_noop/noop_pipe.c | 13 --------- .../auxiliary/driver_trace/tr_screen.c | 27 ------------------- src/gallium/drivers/panfrost/pan_screen.c | 18 ------------- src/gallium/include/pipe/p_screen.h | 14 ---------- 4 files changed, 72 deletions(-) diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index 37136809fd6..2c914fd6d99 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -683,18 +683,6 @@ static void noop_query_compression_modifiers(struct pipe_screen *screen, oscreen->query_compression_modifiers(oscreen, fmt, rate, max, mods, count); } -static bool noop_is_compression_modifier(struct pipe_screen *screen, - enum pipe_format format, uint64_t modifier, - uint32_t *rate) -{ - struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)screen; - struct pipe_screen *oscreen = noop_screen->oscreen; - - if (oscreen->is_compression_modifier) - return oscreen->is_compression_modifier(oscreen, format, modifier, rate); - return false; -} - static void noop_get_driver_uuid(struct pipe_screen *screen, char *uuid) { struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)screen; @@ -858,7 +846,6 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen) screen->set_fence_timeline_value = noop_set_fence_timeline_value; screen->query_compression_rates = noop_query_compression_rates; screen->query_compression_modifiers = noop_query_compression_modifiers; - screen->is_compression_modifier = noop_is_compression_modifier; screen->get_driver_pipe_screen = noop_get_driver_pipe_screen; slab_create_parent(&noop_screen->pool_transfers, diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c index 95cc4d18a84..d457c1e6440 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.c +++ b/src/gallium/auxiliary/driver_trace/tr_screen.c @@ -1481,32 +1481,6 @@ static void trace_screen_query_compression_modifiers(struct pipe_screen *_screen trace_dump_call_end(); } -static bool trace_screen_is_compression_modifier(struct pipe_screen *_screen, - enum pipe_format format, - uint64_t modifier, - uint32_t *rate) -{ - struct trace_screen *tr_scr = trace_screen(_screen); - struct pipe_screen *screen = tr_scr->screen; - bool result; - - trace_dump_call_begin("pipe_screen", "query_compression_rates"); - trace_dump_arg(ptr, screen); - trace_dump_arg(format, format); - trace_dump_arg(uint, modifier); - - result = screen->is_compression_modifier(screen, format, modifier, rate); - - trace_dump_ret_begin(); - trace_dump_uint(*rate); - trace_dump_bool(result); - trace_dump_ret_end(); - - trace_dump_call_end(); - - return result; -} - bool trace_enabled(void) { @@ -1626,7 +1600,6 @@ trace_screen_create(struct pipe_screen *screen) SCR_INIT(driver_thread_add_job); SCR_INIT(query_compression_rates); SCR_INIT(query_compression_modifiers); - SCR_INIT(is_compression_modifier); tr_scr->base.get_driver_pipe_screen = tr_get_driver_pipe_screen; tr_scr->screen = screen; diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 7b329b8852e..8bd4a7c39b2 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -651,23 +651,6 @@ panfrost_query_compression_modifiers(struct pipe_screen *screen, *count = panfrost_afrc_get_modifiers(format, rate, max, modifiers); } -static bool -panfrost_is_compression_modifier(struct pipe_screen *screen, - enum pipe_format format, uint64_t modifier, - uint32_t *rate) -{ - struct panfrost_device *dev = pan_device(screen); - uint32_t compression_rate = panfrost_afrc_get_rate(format, modifier); - - if (!dev->has_afrc) - return false; - - if (rate) - *rate = compression_rate; - - return (compression_rate != 0); -} - /* We always support linear and tiled operations, both external and internal. * We support AFBC for a subset of formats, and colourspace transform for a * subset of those. */ @@ -1008,7 +991,6 @@ panfrost_create_screen(int fd, const struct pipe_screen_config *config, screen->base.query_compression_rates = panfrost_query_compression_rates; screen->base.query_compression_modifiers = panfrost_query_compression_modifiers; - screen->base.is_compression_modifier = panfrost_is_compression_modifier; panfrost_resource_screen_init(&screen->base); pan_blend_shader_cache_init(&dev->blend_shaders, diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index e762d65ae35..a2914f5bfa2 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -831,20 +831,6 @@ struct pipe_screen { enum pipe_format format, uint32_t rate, int max, uint64_t *modifiers, int *count); - /** - * Determine whether the modifer is enabling fixed-rate compression for - * the given screen and format. - * - * If \p rate is not NULL, the value it points to will be set to the - * bitrate (bits per component) associated with the modifier. - * - * \return true if the format+modifier pair is enabling fixed-rate - * compression on \p screen, false otherwise. - */ - bool (*is_compression_modifier)(struct pipe_screen *screen, - enum pipe_format format, uint64_t modifier, - uint32_t *rate); - /** * Check if the given \p target buffer is supported as output (or input for * encode) for this \p profile and \p entrypoint.