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

[DirectX] Introduce llvm.dx.handle.fromBinding intrinsic and lowering #91366

Closed
Tracked by #101555
bogner opened this issue May 7, 2024 · 0 comments · Fixed by #104251
Closed
Tracked by #101555

[DirectX] Introduce llvm.dx.handle.fromBinding intrinsic and lowering #91366

bogner opened this issue May 7, 2024 · 0 comments · Fixed by #104251
Assignees

Comments

@bogner
Copy link
Contributor

bogner commented May 7, 2024

When creating handles from binding information in llvm we'll represent it with a llvm.dx.handle.fromBinding intrinsic that creates a target type. There's more information in #90553 but generally this will look something like so:

; RWBuffer<float4> Buf : register(u5, space3)
%buf = call target("dx.Buffer", <4 x float>, 1, 0)
            @llvm.dx.handle.fromBinding.tdx.Buffer_v4f32_1_0(
                i32 3, i32 5, i32 1, i32 0, i1 false)

This will need to be lowered to either createHandle or createHandleFromBinding + annotateHandle dxil operations depending on the shader model, as well as the dxil metadata for resource binding.

Acceptance Criteria

  • The llvm intrinsic and dxil operation are defined
  • Emitting dxil will translate the llvm intrinsic to the appropriate dxil op(s) and metadata
  • Pre-SM6.6 DXIL and post are both handled.
@bogner bogner changed the title Introduce llvm.dx.handle.fromBinding intrinsic and lowering [DirectX] Introduce llvm.dx.handle.fromBinding intrinsic and lowering May 7, 2024
@bogner bogner moved this to Planning in HLSL Support Jun 18, 2024
@bogner bogner moved this from Planning to Ready in HLSL Support Jun 18, 2024
@bogner bogner moved this from Ready to Active in HLSL Support Jul 1, 2024
@bogner bogner linked a pull request Aug 14, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Active to Done in HLSL Support Aug 23, 2024
bogner added a commit that referenced this issue Aug 27, 2024
Generate metadata from target extension type based resources.

Part of #91366

Pull Request: #104447
5c4lar pushed a commit to 5c4lar/llvm-project that referenced this issue Aug 29, 2024
Generate metadata from target extension type based resources.

Part of llvm#91366

Pull Request: llvm#104447
dmpolukhin pushed a commit to dmpolukhin/llvm-project that referenced this issue Sep 2, 2024
Generate metadata from target extension type based resources.

Part of llvm#91366

Pull Request: llvm#104447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant