summaryrefslogtreecommitdiff
path: root/tests/compute
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-01-10 10:57:04 -0800
committerGitHub <noreply@github.com>2025-01-10 10:57:04 -0800
commit5290c580632cfb56847b863a32dc020a21d1c93e (patch)
tree4c543f28d13f62a1dc3293b76151dda7585743ab /tests/compute
parent4cfae806a6f9c0203ce44c4ce04df5ad66cdc8a2 (diff)
Initial implementation of SP#015 `DescriptorHandle<T>`. (#6028)
* Initial implementation of `ResourcePtr<T>`. * Update docs * Fix build error. * Add more discussion. * Update documentation. * Update TOC. * Fix. * Fix. * Add test case for custom `getResourceFromBindlessHandle`. * Add namehint to generated descriptor heap param. * Fix. * Fix. * format code * Rename to `DescriptorHandle`, and add `T.Handle` alias. * Fix compiler error. * Fix. * Fix build. * Renames. * Fix documentation. * Documentation fix. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/nonuniformres-array-of-textures.slang10
-rw-r--r--tests/compute/nonuniformres-nested-rwstructuredbuf.slang10
2 files changed, 9 insertions, 11 deletions
diff --git a/tests/compute/nonuniformres-array-of-textures.slang b/tests/compute/nonuniformres-array-of-textures.slang
index a7f3e05bd..6cab0131a 100644
--- a/tests/compute/nonuniformres-array-of-textures.slang
+++ b/tests/compute/nonuniformres-array-of-textures.slang
@@ -26,12 +26,12 @@ void main(uint2 pixelIndex : SV_DispatchThreadID)
// CHECK2: %[[VAR5]] = OpAccessChain %_ptr_UniformConstant_{{.*}} %{{.*}} %[[VAR4]]
// CHECK2: %[[VAR6]] = OpLoad %{{.*}} %[[VAR5]]
- // CHECK3: OpDecorate %[[VAR1:[a-zA-Z0-9_]+]] NonUniform
- // CHECK3: OpDecorate %[[VAR2:[a-zA-Z0-9_]+]] NonUniform
- // CHECK3: %[[VAR1]] = OpLoad %{{.*}}
- // CHECK3: %{{.*}} = OpImageFetch %v4float %[[VAR1]] %{{.*}}
- // CHECK3: %[[VAR2]] = OpLoad %{{.*}}
+ // CHECK3: %[[VAR1:[a-zA-Z0-9_]+]] = OpAccessChain{{.*}}NonUniform
+ // CHECK3: %[[VAR2:[a-zA-Z0-9_]+]] = OpLoad %{{.*}}[[VAR1]]{{.*}}NonUniform
// CHECK3: %{{.*}} = OpImageFetch %v4float %[[VAR2]] %{{.*}}
+ // CHECK3: %[[VAR3:[a-zA-Z0-9_]+]] = OpAccessChain{{.*}}NonUniform
+ // CHECK3: %[[VAR4:[a-zA-Z0-9_]+]] = OpLoad %{{.*}}[[VAR3]]{{.*}}NonUniform
+ // CHECK3: %{{.*}} = OpImageFetch %v4float %[[VAR4]] %{{.*}}
float2 tmp0 = textures[NonUniformResourceIndex(pixelIndex.x)].Load(int3(0, 0, 0));
outputTexture[0] = tmp0;
diff --git a/tests/compute/nonuniformres-nested-rwstructuredbuf.slang b/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
index b188a2c52..f935ce799 100644
--- a/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
+++ b/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
@@ -8,9 +8,9 @@ RWStructuredBuffer<int> buffer[];
[numthreads(8, 1, 1)]
void main(uint3 dispatchThreadID: SV_DispatchThreadID)
{
- // CHECK0: buffer_{{.*}}[nonuniformEXT(nonuniformEXT(nonuniformEXT({{.*}})))]
+ // CHECK0: buffer_{{.*}}[nonuniformEXT({{.*}})]
- // CHECK1: buffer_{{.*}}[NonUniformResourceIndex(NonUniformResourceIndex(NonUniformResourceIndex(_{{.*}})))]
+ // CHECK1: buffer_{{.*}}[NonUniformResourceIndex(_{{.*}})]
// CHECK2-DAG: OpDecorate %[[VAR1:[a-zA-Z0-9_]+]] NonUniform
// CHECK2-DAG: OpDecorate %[[VAR2:[a-zA-Z0-9_]+]] NonUniform
@@ -21,11 +21,9 @@ void main(uint3 dispatchThreadID: SV_DispatchThreadID)
// CHECK2: %[[VAR3]] = OpCopyObject %{{.*}}
// CHECK2: %{{.*}} = OpBitcast %int %[[VAR3]]
- // CHECK3-DAG: OpDecorate %[[VAR1:[a-zA-Z0-9_]+]] NonUniform
- // CHECK3-DAG: OpDecorate %[[VAR2:[a-zA-Z0-9_]+]] NonUniform
- // CHECK3: %[[VAR1]] = OpAccessChain %_ptr_StorageBuffer_RWStructuredBuffer %buffer %{{.*}}
+ // CHECK3: %[[VAR1:[a-zA-Z0-9_]+]] = OpAccessChain %_ptr_StorageBuffer_RWStructuredBuffer %buffer %{{.*}}NonUniform
// CHECK3: %{{.*}} = OpAccessChain %_ptr_StorageBuffer_int %[[VAR1]]
- // CHECK3: %[[VAR2]] = OpAccessChain %_ptr_StorageBuffer_RWStructuredBuffer %buffer %{{.*}}
+ // CHECK3: %[[VAR2:[a-zA-Z0-9_]+]] = OpAccessChain %_ptr_StorageBuffer_RWStructuredBuffer %buffer %{{.*}}NonUniform
// CHECK3: %{{.*}} = OpAccessChain %_ptr_StorageBuffer_int %[[VAR2]]
RWStructuredBuffer<int> buffer1 = buffer[NonUniformResourceIndex(NonUniformResourceIndex(NonUniformResourceIndex(dispatchThreadID.x)))];
buffer1[0] = 1;