Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify PoolAlloc by using thread_local #2348

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

ben-clayton
Copy link
Contributor

C++11 supports thread_local storage class, which means we can drop the use of OS-bespoke OS_*TLSIndex functions.

This greatly simplifies fixing #2346.

Note: thread_local was not properly supported in Visual Studio 2013, so I've had to bump appveyor to use Visual Studio 2015.
Visual Studio 2013 is scheduled to be deprecated on July 20th 2020, so this should probably not land until then.

glslang is using C++ 11, which has first class support for variables of the `thread_local` storage class.

By dropping the use of the `OS_[GS]etTLSValue`, we can simplify the logic, and have it support a thread-local default allocator if none is provided.

Issue: KhronosGroup#2346
These were only used for TThreadPool, which now uses `thread_local`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants