Skip to content

[HLSL][NFC] Add resource globals created for metadata to test baseline #140620

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

Merged
merged 1 commit into from
May 19, 2025

Conversation

hekota
Copy link
Member

@hekota hekota commented May 19, 2025

Adds checks for resource globals that were created for DXIL metadata. The names of the globals and the names of the types will be changing soon. Adding these to the baseline will make it easier to see what is changing.

@hekota hekota marked this pull request as ready for review May 19, 2025 20:58
@llvmbot
Copy link
Member

llvmbot commented May 19, 2025

@llvm/pr-subscribers-backend-directx

Author: Helena Kotas (hekota)

Changes

Adds checks for resource globals that were created for DXIL metadata. The names of the globals and the names of the types will be changing soon. Adding these to the baseline will make it easier to see what is changing.


Full diff: https://github.com/llvm/llvm-project/pull/140620.diff

2 Files Affected:

  • (modified) llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll (+9)
  • (modified) llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll (+12)
diff --git a/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll b/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
index 63ead534f1276..03c801ff0372f 100644
--- a/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
+++ b/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
@@ -84,6 +84,15 @@ define void @test() #0 {
 
 attributes #0 = { noinline nounwind "hlsl.shader"="compute" }
 
+; CHECK: @0 = external constant %TypedBuffer
+; CHECK: @1 = external constant %TypedBuffer.0
+; CHECK: @2 = external constant %TypedBuffer.1
+; CHECK: @3 = external constant %TypedBuffer.2
+; CHECK: @4 = external constant %ByteAddressBuffer
+; CHECK: @5 = external constant %StructuredBuffer
+; CHECK: @6 = external constant %TypedBuffer.3
+; CHECK: @7 = external constant %TypedBuffer.4
+
 ; CHECK: !dx.resources = !{[[ResList:[!][0-9]+]]}
 
 ; CHECK: [[ResList]] = !{[[SRVList:[!][0-9]+]], null, null, null}
diff --git a/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll b/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
index e2f7cffb50f3c..98651e47d103d 100644
--- a/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
+++ b/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
@@ -108,6 +108,18 @@ define void @test() #0 {
 
 attributes #0 = { noinline nounwind "hlsl.shader"="compute" }
 
+; CHECK: @0 = external constant %RWTypedBuffer
+; CHECK: @1 = external constant %RWTypedBuffer.0
+; CHECK: @2 = external constant %RWTypedBuffer.1
+; CHECK: @3 = external constant %RWTypedBuffer.2
+; CHECK: @4 = external constant %RWByteAddressBuffer
+; CHECK: @5 = external constant %RWStructuredBuffer
+; CHECK: @6 = external constant %RasterizerOrderedTypedBuffer
+; CHECK: @7 = external constant %RasterizerOrderedStructuredBuffer
+; CHECK: @8 = external constant %RasterizerOrderedByteAddressBuffer
+; CHECK: @9 = external constant %RWTypedBuffer.3
+; CHECK: @10 = external constant %RWTypedBuffer.4
+
 ; CHECK: !dx.resources = !{[[ResList:[!][0-9]+]]}
 
 ; CHECK: [[ResList]] = !{null, [[UAVList:[!][0-9]+]], null, null}

@hekota hekota merged commit b586ddf into llvm:main May 19, 2025
16 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
llvm#140620)

Adds checks for resource globals that were created for DXIL metadata.
The names of the globals and the names of the types will be changing
soon. Adding these to the baseline will make it easier to see what is
changing.
ajaden-codes pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 6, 2025
llvm#140620)

Adds checks for resource globals that were created for DXIL metadata.
The names of the globals and the names of the types will be changing
soon. Adding these to the baseline will make it easier to see what is
changing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants