microsoft / hlsl-specs

HLSL Specifications
MIT License
118 stars 30 forks source link

Introduce program linkage #295

Closed llvm-beanz closed 1 month ago

llvm-beanz commented 1 month ago

The C++ specification talks in terms of module, external, internal, and no linkage. These linkages in C++ refer to translation units. For HLSL, we have some differences in how programs are built and linked that can't be fully expressed in that language.

Specifically, we have a notion of a program-export (entry functions, export keyword), that denotes a linkage that is more external than just cross translation unit.

This change introduces a term program linkage to refer to names that have linkage outside a linked or freestanding program.