KhronosGroup / KhronosGroup/glslang
Remove global state
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
Using global state (`ShInitialize`, `InitGlobalLock`, `PerProcessGPA` etc.) is bad API design and makes using glslang in multi-threaded applications both risky and difficult.
You should group this global state into a “context” struct and pass it around explicitly where needed.
Contributor guide
Research direction
Start by tracing the named global-state entry points and symbols: ShInitialize, InitGlobalLock, and PerProcessGPA. Map where that state is created and consumed before deciding how a context struct could be passed through the relevant paths. Done means global state is replaced by explicit context passing and multi-threaded use is no longer risky.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100