Skip to content

[HLSL] Implement default constant buffer $Globals #123801

@hekota

Description

@hekota

All non-resource variable declarations in the global scope are implicitly added to $Global constant buffer.

In Sema we need to recognize these declarations and assign them hlsl_constant address space. At the end of Sema we will probably need to generate an implicit HLSLBufferDecl for the $Globals constant buffer and create its layout struct. Then we need to add support for it in codegen, making sure the code is generated in a similar way as other cbuffers.

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions