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] Introduce a new address space for constant buffer declarations #123406

Open
hekota opened this issue Jan 17, 2025 · 0 comments
Open

[HLSL] Introduce a new address space for constant buffer declarations #123406

hekota opened this issue Jan 17, 2025 · 0 comments
Labels
HLSL HLSL Language Support

Comments

@hekota
Copy link
Member

hekota commented Jan 17, 2025

Introduce a new address space hlsl_constant(2) for constant buffer declarations. Using separate address space will make it easier to distinguish constant globals from other global values. It will be used for all variants of constant buffers :

  • cbuffer declarations blocks
  • default $Globals constant bufffer
  • ConstantBuffer<T>

Clang codegen will generate constant buffer accesses as global variable loads from with hlsl_constant(2) address space. These will be transformed to constant buffer load intrinsics later on in an LLVM pass.

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: Planning
Development

No branches or pull requests

1 participant