Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on cbuffer variable initializer #259

Open
llvm-beanz opened this issue Jun 12, 2024 · 0 comments
Open

Error on cbuffer variable initializer #259

llvm-beanz opened this issue Jun 12, 2024 · 0 comments
Labels
Theme:Consistency Issues related to HLSL not being consistent
Milestone

Comments

@llvm-beanz
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
For 9 years DXC has silently ignored initializers on cbuffer values. It's time to make that an error.

Describe the solution you'd like
If a shader initializes a cbuffer member or other global constant that gets folded into a cbuffer the compiler should emit an error.

Describe alternatives you've considered
We could make it a warning, but since we really do nothing with the value IMO it's better to error to force users to deal with it.

Additional context
Related issue: microsoft/DirectXShaderCompiler#2384

@llvm-beanz llvm-beanz added this to the HLSL 202x milestone Aug 7, 2024
@llvm-beanz llvm-beanz added Theme:Consistency Issues related to HLSL not being consistent and removed needs-triage labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Theme:Consistency Issues related to HLSL not being consistent
Projects
Status: Triaged
Development

No branches or pull requests

1 participant