microsoft / hlsl-specs

HLSL Specifications
MIT License
110 stars 29 forks source link

New keyword 'threadlocal' as a substitute for `static` on global variables #173

Open kylawl opened 4 months ago

kylawl commented 4 months ago

This is a minor one, but I always have to do a double take on static globals. It's semantically different than a static global in c/c++.

I think a new keyword like threadlocal may be more appropriate to clarifying how the variable is used. Seems like it would also pair better with groupshared as well.

devshgraphicsprogramming commented 2 months ago

+1