-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
HLSLHLSL Language SupportHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
All non-resource variable declarations in the global scope are implicitly added to $Global constant buffer.
The declarations can have an explicit layout specifies by using the : register(c#) annotation. This task is to track implementation of the explicit layout of $Globals constant buffer.
https://godbolt.org/z/3PvocPr6v
For this global constants:
int a;
float b : register(c1);
The buffer layout should look like this:
cbuffer $Globals
{
struct $Globals
{
int a; ; Offset: 20
float b; ; Offset: 16
} $Globals; ; Offset: 0 Size: 24
}
The declarations without register(c#) annotations are placed in the buffer after the explicit ones.
Metadata
Metadata
Assignees
Labels
HLSLHLSL Language SupportHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Type
Projects
Status
Closed