From 2af8172b62b619edfdc39296344b30b4de1adafe Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Wed, 22 Jan 2025 11:15:56 +0800 Subject: [PATCH] gallium: fix ddebug and noop screen caps init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: a036231c096 ("gallium: add u_init_pipe_screen_caps") Reviewed-by: Alyssa Rosenzweig Acked-by: Marek Olšák Part-of: --- src/gallium/auxiliary/driver_ddebug/dd_screen.c | 3 +++ src/gallium/auxiliary/driver_noop/noop_pipe.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/driver_ddebug/dd_screen.c b/src/gallium/auxiliary/driver_ddebug/dd_screen.c index 57abbd899e1..72f8f164351 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_screen.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_screen.c @@ -679,6 +679,9 @@ ddebug_screen_create(struct pipe_screen *screen) SCR_INIT(vertex_state_destroy); dscreen->base.get_driver_pipe_screen = dd_get_driver_pipe_screen; + /* copy all caps */ + *(struct pipe_caps *)&dscreen->base.caps = screen->caps; + #undef SCR_INIT dscreen->screen = screen; diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index b180d8f73f3..c67db0899a2 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -831,6 +831,9 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen) screen->query_compression_modifiers = noop_query_compression_modifiers; screen->get_driver_pipe_screen = noop_get_driver_pipe_screen; + /* copy all caps */ + *(struct pipe_caps *)&screen->caps = oscreen->caps; + slab_create_parent(&noop_screen->pool_transfers, sizeof(struct pipe_transfer), 64);