summaryrefslogtreecommitdiffstats
path: root/tests/spirv/large-struct.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-01 19:09:29 -0700
committerGitHub <noreply@github.com>2025-07-02 02:09:29 +0000
commitc701ec00ccce6dfa8094d6550ce2db929fc8cefe (patch)
tree4f729e8fa5700b2d6d7d99f34514682e3ad351f8 /tests/spirv/large-struct.slang
parent83c72fd8772d312233f4e3ccd4154b81030d4795 (diff)
Defer immutable buffer loads when emitting spirv. (#7579)
* Defer immutable buffer loads when emitting spirv. * Fix. * Fix. * Fix. * Fix tests. * Fix test.
Diffstat (limited to 'tests/spirv/large-struct.slang')
-rw-r--r--tests/spirv/large-struct.slang9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/spirv/large-struct.slang b/tests/spirv/large-struct.slang
index 7738a5fcf..2d79c0aaf 100644
--- a/tests/spirv/large-struct.slang
+++ b/tests/spirv/large-struct.slang
@@ -3,9 +3,8 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-d3d12 -compute -output-using-type
//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-cpu -compute -output-using-type
-// Check that when generating spirv directly, we use a loop
-// to copy large arrays in input data out into a local variable, instead of emitting
-// unrolled code that reads each element of the array individually.
+// Check that when generating spirv directly, we do not load the entire big array
+// from the constant buffer into registers.
struct WorkData
{
@@ -21,7 +20,9 @@ ConstantBuffer<WorkData> input;
//TEST_INPUT:set resultBuffer = out ubuffer(data=[0 0 0 0], stride=4)
RWStructuredBuffer<float> resultBuffer;
-// CHECK: OpLoopMerge
+// CHECK-NOT: OpLoopMerge
+// CHECK-NOT: OpCompositeConstruct
+// CHECK-COUNT-1: OpStore
[numthreads(2, 1, 1)]
void computeMain(uint3 tid: SV_DispatchThreadID)