From this commit:
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.
Created attachment 123238 [details] [review]
patch for Mesa 11.2.0
Created attachment 123245 [details] [review]
patch for Mesa 11.2.0 (also works for Mesa 11.1.2)
Pushed to master as cee459d84de7533d0e0a74a37f7fc4c0f2b77bcf. Closing.