https://bugs.freedesktop.org/show_bug.cgi?id=95128

            Bug ID: 95128
           Summary: [Gallium] uninitialized once_flag causes unregistered
                    targets
           Product: Mesa
           Version: 11.2
          Hardware: Other
                OS: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: Mesa core
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

>From this commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp?id=76cfd6f1da3748effb480e4f1151910af59fb88a

there is the line
static once_flag init_native_targets_once_flag;

where the once_flag is not initialized. This causes pthread_once() to never
call the function on some OSs (I got the bug with OSX 10.6, but not with OSX
10.11).

once_flags should *always* be initialized, as in:
static once_flag init_native_targets_once_flag = ONCE_FLAG_INIT;


The consequence is that I get errors like
"Unable to find target for this triple (no targets are registered)"
when using llvmpipe

I checked other places in Mesa that use once_flag, they are all initialized
correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to