Mesa (master): drisw: Use debug_screen_wrap like everybody else
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 4 22:43:51 UTC 2021
Module: Mesa
Branch: master
Commit: 90de4ec12998b7c52f113afbcbd91b4b2e9aa4dd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90de4ec12998b7c52f113afbcbd91b4b2e9aa4dd
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Dec 18 09:45:41 2020 -0500
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8166>
---
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 5afca2b6718..405ac7c56b4 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 e92b03be943..ba803d4cda3 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;
}
More information about the mesa-commit
mailing list