From 379b3a782d6ebb85dd8d6e393db713085621c99d Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Wed, 22 Jan 2025 11:25:36 +0800 Subject: [PATCH] gallium: copy shader and compute caps for ddebug/noop/trace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alyssa Rosenzweig Acked-by: Marek Olšák Part-of: --- src/gallium/auxiliary/driver_ddebug/dd_screen.c | 2 ++ src/gallium/auxiliary/driver_noop/noop_pipe.c | 2 ++ src/gallium/auxiliary/driver_trace/tr_screen.c | 2 ++ 3 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 25f383251b3..13c0e7e379b 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_screen.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_screen.c @@ -680,6 +680,8 @@ ddebug_screen_create(struct pipe_screen *screen) /* copy all caps */ *(struct pipe_caps *)&dscreen->base.caps = screen->caps; + *(struct pipe_compute_caps *)&dscreen->base.compute_caps = screen->compute_caps; + memcpy((void *)dscreen->base.shader_caps, screen->shader_caps, sizeof(screen->shader_caps)); #undef SCR_INIT diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index eb30e9853d5..924ef618b3d 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -832,6 +832,8 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen) /* copy all caps */ *(struct pipe_caps *)&screen->caps = oscreen->caps; + *(struct pipe_compute_caps *)&screen->compute_caps = oscreen->compute_caps; + memcpy((void *)screen->shader_caps, oscreen->shader_caps, sizeof(screen->shader_caps)); slab_create_parent(&noop_screen->pool_transfers, sizeof(struct pipe_transfer), 64); diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c index 3ad31a8e20a..a095f191eb5 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.c +++ b/src/gallium/auxiliary/driver_trace/tr_screen.c @@ -1565,6 +1565,8 @@ trace_screen_create(struct pipe_screen *screen) /* copy all caps */ *(struct pipe_caps *)&tr_scr->base.caps = screen->caps; + *(struct pipe_compute_caps *)&tr_scr->base.compute_caps = screen->compute_caps; + memcpy((void *)tr_scr->base.shader_caps, screen->shader_caps, sizeof(screen->shader_caps)); return &tr_scr->base;