From 90de4ec12998b7c52f113afbcbd91b4b2e9aa4dd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 18 Dec 2020 09:45:41 -0500 Subject: [PATCH] drisw: Use debug_screen_wrap like everybody else I tried to use GALLIUM_TRACE with llvmpipe and it didn't work, because we were never letting the debug wrappers initialize. Part-of: --- src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 4 +++- src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index 5afca2b..405ac7c 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -39,10 +39,12 @@ #include "sw/null/null_sw_winsys.h" #include "sw/wrapper/wrapper_sw_winsys.h" #include "target-helpers/sw_helper_public.h" +#include "target-helpers/inline_debug_helper.h" #include "frontend/drisw_api.h" #include "frontend/sw_driver.h" #include "frontend/sw_winsys.h" + struct pipe_loader_sw_device { struct pipe_loader_device base; const struct sw_driver_descriptor *dd; @@ -316,7 +318,7 @@ pipe_loader_sw_create_screen(struct pipe_loader_device *dev, if (!screen) sdev->ws->destroy(sdev->ws); - return screen; + return screen ? debug_screen_wrap(screen) : NULL; } static const struct pipe_loader_ops pipe_loader_sw_ops = { diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index e92b03b..ba803d4 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -5,6 +5,7 @@ #include "pipe/p_compiler.h" #include "util/u_debug.h" #include "frontend/sw_winsys.h" +#include "target-helpers/inline_debug_helper.h" #ifdef GALLIUM_SWR #include "swr/swr_public.h" @@ -69,7 +70,7 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) screen = d3d12_create_dxcore_screen(winsys, NULL); #endif - return screen; + return screen ? debug_screen_wrap(screen) : NULL; } -- 2.7.4