-
Notifications
You must be signed in to change notification settings - Fork 56
Remove unsized arrays #141
Copy link
Copy link
Open
Labels
BreakingA proposal that will break at least some existing shadersA proposal that will break at least some existing shaders
Milestone
Metadata
Metadata
Assignees
Labels
BreakingA proposal that will break at least some existing shadersA proposal that will break at least some existing shaders
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Triaged
Status
No status
Is your feature request related to a problem? Please describe.
We allow unsized arrays in most contexts that C would, but they sometimes cause crashes in the compiler and other unexpected behaviors. Unsized arrays also break the basic rules of HLSL parameter passing (which isn't great).
Describe the solution you'd like
We need to design a way to support unsized arrays (or something functionally equivalent) for resource types, but we should remove support for unsized arrays from the language (at least until we support general pointers).
Describe alternatives you've considered
In Clang we're more clearly defining the semantics for unsized arrays which will allow us to avoid some of the bugginess in DXC. We could stick with that approach, but it still leaves the language handling of unsized array parameters to be a bit awkward.
Additional context
See this documentation PR.