aux/trace: fix bool argument
The second argument to debug_get_bool_option is a boolean, not a
pointer. Passing a NULL-pointer there triggers a warning, which we treat
as an error on MSVC:
---8<---
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): error C2220:
the following warning is treated as an error
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): warning C4047:
'function': 'bool' differs in levels of indirection from 'void *'
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): error C4024:
'debug_get_bool_option': different types for formal and actual parameter 2
---8<---
Fixes: c1270d4845
("aux/trace: add screen deduplication for zink+lavapipe tracing")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11424>
This commit is contained in:
parent
ea5707c52f
commit
bae4dca8e4
|
@ -1067,7 +1067,7 @@ trace_screen_create(struct pipe_screen *screen)
|
|||
const char *driver = debug_get_option("MESA_LOADER_DRIVER_OVERRIDE", NULL);
|
||||
if (driver && !strcmp(driver, "zink")) {
|
||||
/* the user wants zink: check whether they want to trace zink or lavapipe */
|
||||
bool trace_lavapipe = debug_get_bool_option("ZINK_TRACE_LAVAPIPE", NULL);
|
||||
bool trace_lavapipe = debug_get_bool_option("ZINK_TRACE_LAVAPIPE", false);
|
||||
if (!strncmp(screen->get_name(screen), "zink", 4)) {
|
||||
/* this is the zink screen: only trace if lavapipe tracing is disabled */
|
||||
if (trace_lavapipe)
|
||||
|
|
Loading…
Reference in New Issue