projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7102ac
)
gallium/trace: Fix helgrind complaint about one-time init
author
Rob Clark
<robdclark@chromium.org>
Tue, 17 Nov 2020 22:39:32 +0000
(14:39 -0800)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 24 Nov 2020 21:03:34 +0000
(21:03 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7644>
src/gallium/auxiliary/driver_trace/tr_screen.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/driver_trace/tr_screen.c
b/src/gallium/auxiliary/driver_trace/tr_screen.c
index
56a70de
..
90ee536
100644
(file)
--- a/
src/gallium/auxiliary/driver_trace/tr_screen.c
+++ b/
src/gallium/auxiliary/driver_trace/tr_screen.c
@@
-670,15
+670,11
@@
trace_screen_destroy(struct pipe_screen *_screen)
bool
trace_enabled(void)
{
- static bool firstrun = true;
-
- if (!firstrun)
- return trace;
- firstrun = false;
-
- if(trace_dump_trace_begin()) {
- trace_dumping_start();
- trace = true;
+ do_once {
+ if(trace_dump_trace_begin()) {
+ trace_dumping_start();
+ trace = true;
+ }
}
return trace;