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

[HLSL] Make sure Clang handles uncommon cbuffer constructs per spec #118524

Open
hekota opened this issue Dec 3, 2024 · 1 comment
Open

[HLSL] Make sure Clang handles uncommon cbuffer constructs per spec #118524

hekota opened this issue Dec 3, 2024 · 1 comment
Labels
HLSL HLSL Language Support

Comments

@hekota
Copy link
Member

hekota commented Dec 3, 2024

DXC supports a number of uncommon cbuffer declaration uses such as nested cbuffer declarations, static variable declaration, namespaces and function declarations inside cbuffer context. HLSL Language spec will define which of these are allowed or not (microsoft/hlsl-specs#357).

This task tracks the implementation of the 'cbuffer' construct features that are allowed. For those that are not we should report an error.

@tex3d put together an example that these various interesting cases here:
https://godbolt.org/z/E4cdx7xj8

Same shader with FXC:
https://shader-playground.timjones.io/39c0683735c0cd79b5970b5116765940

AC:

  • allowed 'cbuffer' uses are implemented in Clang and tested
  • errors are reported for disallowed uses

Depends on: microsoft/hlsl-specs#357

Related issues:

@hekota hekota moved this to Planning in HLSL Support Dec 3, 2024
@EugeneZelenko EugeneZelenko added HLSL HLSL Language Support and removed new issue labels Dec 3, 2024
@davidcook-msft davidcook-msft changed the title [HLSL] Supported nested cbuffers and other unusual constructs related to cbuffer declarations [HLSL] Update the language spec about how supported nested cbuffers and other unusual constructs related to cbuffer declarations Dec 3, 2024
@davidcook-msft davidcook-msft changed the title [HLSL] Update the language spec about how supported nested cbuffers and other unusual constructs related to cbuffer declarations [HLSL] Supported nested cbuffers and other unusual constructs related to cbuffer declarations Dec 3, 2024
@davidcook-msft davidcook-msft moved this from Planning to Ready in HLSL Support Dec 3, 2024
@hekota hekota moved this from Ready to Designing in HLSL Support Dec 3, 2024
@hekota hekota changed the title [HLSL] Supported nested cbuffers and other unusual constructs related to cbuffer declarations [HLSL] Make sure Clang handles uncommon cbuffer constructs per spec Dec 11, 2024
@damyanp
Copy link
Contributor

damyanp commented Jan 13, 2025

Revisit after llvm/wg-hlsl#41 is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HLSL HLSL Language Support
Projects
Status: Designing
Development

No branches or pull requests

3 participants