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

[HLSL][NFC] Add test check to make sure the resource handle gets stored in the resource global #124866

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

hekota
Copy link
Member

@hekota hekota commented Jan 29, 2025

No description provided.

@hekota hekota changed the title [HLSL] Checks store instructions in resource binding test [HLSL][NFC] Checks store instructions in resource binding test Jan 29, 2025
@hekota hekota changed the title [HLSL][NFC] Checks store instructions in resource binding test [HLSL][NFC] Add test check to make sure the resource handle gets stored in the resource global Jan 29, 2025
@hekota hekota marked this pull request as ready for review January 29, 2025 06:06
@llvmbot llvmbot added clang Clang issues not falling into any other category HLSL HLSL Language Support labels Jan 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 29, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-hlsl

Author: Helena Kotas (hekota)

Changes

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

1 Files Affected:

  • (modified) clang/test/CodeGenHLSL/resource-bindings.hlsl (+4)
diff --git a/clang/test/CodeGenHLSL/resource-bindings.hlsl b/clang/test/CodeGenHLSL/resource-bindings.hlsl
index bfa7896bd98114..57e8cc29572b1f 100644
--- a/clang/test/CodeGenHLSL/resource-bindings.hlsl
+++ b/clang/test/CodeGenHLSL/resource-bindings.hlsl
@@ -2,14 +2,17 @@
 
 // CHECK: define internal void @_init_resource_U0S0()
 // CHECK: %U0S0_h = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_v4f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.TypedBuffer", <4 x float>, 1, 0, 0) %U0S0_h, ptr @U0S0, align 4
 RWBuffer<float4> U0S0 : register(u0);
 
 // CHECK: define internal void @_init_resource_U5S3()
 // CHECK: %U5S3_h = call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 3, i32 5, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.TypedBuffer", float, 1, 0, 0) %U5S3_h, ptr @U5S3, align 4
 RWBuffer<float> U5S3 : register(u5, space3);
 
 // CHECK: define internal void @_init_resource_T2S2()
 // CHECK: %T2S2_h = call target("dx.RawBuffer", i32, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i32_0_0t(i32 2, i32 2, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.RawBuffer", i32, 0, 0) %T2S2_h, ptr @T2S2, align 4
 StructuredBuffer<int> T2S2 : register(t2, space2);
 struct S {
   float4 f;
@@ -18,6 +21,7 @@ struct S {
 
 // CHECK: define internal void @_init_resource_T3S0()
 // CHECK: %T3S0_h = call target("dx.RawBuffer", %struct.S, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_s_struct.Ss_0_0t(i32 0, i32 3, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.RawBuffer", %struct.S, 0, 0) %T3S0_h, ptr @T3S0, align 4
 StructuredBuffer<S> T3S0 : register(t3);
 
 // CHECK: define void @main()

@hekota hekota merged commit 501901e into llvm:main Feb 7, 2025
13 checks passed
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants