-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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] Add DirectXTargetCodeGenInfo and the code paths to convert HLSL types to DirectX target types #95952
Labels
clang:codegen
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
HLSL
HLSL Language Support
Comments
This was referenced Jun 18, 2024
hekota
added a commit
to hekota/llvm-project
that referenced
this issue
Jun 21, 2024
Modify all places where HLSLResource needs to be added to use the def file. Future intangible types will be added just to HLSLIntangibleTypes.def and everything else should just work. Add getHLSLType virtual method to TargetCodeGenInfo to be overridden in future DirectXTargetCodeGenInfo class (llvm#95952).
13 tasks
hekota
added a commit
to hekota/llvm-project
that referenced
this issue
Aug 19, 2024
Adds TargetCodeGenInfo class for DirectX. Currently in only translates `target("dx.TypedBuffer", i32, 1, 0, 1)` for now (`RWBuffer<int>`). More work us needed to determine the actual target exp type and its parameters based on attributes on the handle type (not yet implemented). Part 1/2 of llvm#95952
Blocked by #104861 |
hekota
added a commit
that referenced
this issue
Sep 10, 2024
Adds target codegen info class for DirectX. For now it always translates `__hlsl_resource_t` handle to `target("dx.TypedBuffer", i32, 1, 0, 1)` (`RWBuffer<int>`). More work is needed to determine the actual target exp type and parameters based on the resource handle attributes. Part 1/2 of #95952
hekota
added a commit
that referenced
this issue
Oct 15, 2024
…o convert HLSL types to DirectX target types (#110327) Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full canonical type. This is required for codegen and other clang infrastructure to work property on HLSL resource types. Fixes #95952 (part 2/2)
@llvm/issue-subscribers-clang-codegen Author: Justin Bogner (bogner)
Introduce `CGHLSLRuntime::convertHLSLSpecificType` and `TargetInfo::getHLSLType` interfaces and implement these in DirectXTargetCodeGenInfo to lower the HLSLResource built in type to DirectX-specific TargetExtTypes.
The interfaces should be similar to the OpenCL interfaces of the same names. AC:
|
@llvm/issue-subscribers-clang-frontend Author: Justin Bogner (bogner)
Introduce `CGHLSLRuntime::convertHLSLSpecificType` and `TargetInfo::getHLSLType` interfaces and implement these in DirectXTargetCodeGenInfo to lower the HLSLResource built in type to DirectX-specific TargetExtTypes.
The interfaces should be similar to the OpenCL interfaces of the same names. AC:
|
DanielCChen
pushed a commit
to DanielCChen/llvm-project
that referenced
this issue
Oct 16, 2024
…o convert HLSL types to DirectX target types (llvm#110327) Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full canonical type. This is required for codegen and other clang infrastructure to work property on HLSL resource types. Fixes llvm#95952 (part 2/2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:codegen
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
HLSL
HLSL Language Support
Introduce
CGHLSLRuntime::convertHLSLSpecificType
andTargetInfo::getHLSLType
interfaces and implement these in DirectXTargetCodeGenInfo to lower the HLSLResource built in type to DirectX-specific TargetExtTypes.The interfaces should be similar to the OpenCL interfaces of the same names.
AC:
RWBuffer
is converted to atarget("dx.TypedBuffer")
during clang codegen when targeting DXILThe text was updated successfully, but these errors were encountered: