mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
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> (cherry picked from commitbae4dca8e4)
This commit is contained in:
parent
9f3f84ab3c
commit
45b8874ddc
2 changed files with 2 additions and 2 deletions
|
|
@ -490,7 +490,7 @@
|
|||
"description": "aux/trace: fix bool argument",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c1270d4845d39939d6a7d3b1b81e0d2f9e33133d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -836,7 +836,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…
Add table
Reference in a new issue