-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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] Create HLSLConstantAccess pass to translate hlsl_constant
loads
#124630
Labels
HLSL
HLSL Language Support
Comments
hekota
added a commit
that referenced
this issue
Feb 20, 2025
Translates `cbuffer` declaration blocks to `target("dx.CBuffer")` type. Creates global variables in `hlsl_constant` address space for all `cbuffer` constant and adds metadata describing which global constant belongs to which constant buffer. For explicit constant buffer layout information an explicit layout type `target("dx.Layout")` is used. This might change in the future. The constant globals are temporary and will be removed in upcoming pass that will translate `load` instructions in the `hlsl_constant` address space to constant buffer load intrinsics calls off a CBV handle (#124630, #112992). See [Constant buffer design doc](llvm/wg-hlsl#94) for more details. Fixes #113514, #106596
bogner
added a commit
to bogner/llvm-project
that referenced
this issue
Apr 7, 2025
This introduces a pass that walks accesses to globals in cbuffers and replaces them with accesses via the cbuffer handle itself. The logic to interpret the cbuffer metadata is kept in `lib/Frontend/HLSL` so that it can be reused by other consumers of that metadata. Fixes llvm#124630.
bogner
added a commit
to bogner/llvm-project
that referenced
this issue
Apr 8, 2025
This introduces a pass that walks accesses to globals in cbuffers and replaces them with accesses via the cbuffer handle itself. The logic to interpret the cbuffer metadata is kept in `lib/Frontend/HLSL` so that it can be reused by other consumers of that metadata. Fixes llvm#124630.
bogner
added a commit
to bogner/llvm-project
that referenced
this issue
Apr 9, 2025
This introduces a pass that walks accesses to globals in cbuffers and replaces them with accesses via the cbuffer handle itself. The logic to interpret the cbuffer metadata is kept in `lib/Frontend/HLSL` so that it can be reused by other consumers of that metadata. Fixes llvm#124630.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a new
HLSLConstantAccess
pass that will translate allload
instructions inhlsl_constant
address space tollvm.{dx|spv}.resource.load.cbuffer
intrinsics calls. It will make use of the metadata generated in #113514 that maps the constants global variables to individual constant buffers and specified the constant buffer layout. The pass also needs to transform relatedgetelementptr
instructions to use the constant buffer layout offsets.After the
HLSLConstantAccess
pass completes the constant buffer metadata is no longer needed and should be removed.The text was updated successfully, but these errors were encountered: