From dd06c245771d1e22a62c941791a0613da8bf19d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 8 Jul 2025 01:36:39 -0400 Subject: [PATCH] gallium/noop: fix a crash in sampler_view_release This fixes running shader-db with GALLIUM_NOOP, which is good for measuring only GLSL/frontend compile times. Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/auxiliary/driver_noop/noop_state.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c b/src/gallium/auxiliary/driver_noop/noop_state.c index 4aaca3a2fd1..0498219301d 100644 --- a/src/gallium/auxiliary/driver_noop/noop_state.c +++ b/src/gallium/auxiliary/driver_noop/noop_state.c @@ -177,14 +177,6 @@ static void noop_sampler_view_destroy(struct pipe_context *ctx, FREE(state); } - -static void noop_sampler_view_release(struct pipe_context *ctx, - struct pipe_sampler_view *state) -{ - noop_sampler_view_destroy(ctx, state); -} - - static void noop_bind_state(struct pipe_context *ctx, void *state) { } @@ -452,7 +444,7 @@ void noop_init_state_functions(struct pipe_context *ctx) ctx->set_viewport_states = noop_set_viewport_states; ctx->set_window_rectangles = noop_set_window_rectangles; ctx->sampler_view_destroy = noop_sampler_view_destroy; - ctx->sampler_view_release = noop_sampler_view_release; + ctx->sampler_view_release = u_default_sampler_view_release; ctx->draw_vbo = noop_draw_vbo; ctx->draw_vertex_state = noop_draw_vertex_state; ctx->launch_grid = noop_launch_grid;