Skip to content

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

Closed
@hekota

Description

@hekota

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.

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions