mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
gallium/trace: Fix helgrind complaint about one-time init
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>
This commit is contained in:
parent
f7102ac376
commit
1aa055539f
1 changed files with 5 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue