summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-12-03 15:52:02 -0800
committerGitHub <noreply@github.com>2024-12-03 15:52:02 -0800
commitffcb1030f72af757fc03aa395e19b976d6405126 (patch)
tree0864f34e0819d5f9073bc46a4b1a8cdea47d8868 /tests
parenta49461b2dc57d007619ec157eb0f63e77ab9c0ed (diff)
Add intrinsics for aligned load/store. (#5736)
* Add intrinsics for aligned load/store. * Fix. * Update comment. * Implement aligned load/store as intrinsic_op. * Fix. * Add proposal doc. * fix typo.
Diffstat (limited to 'tests')
-rw-r--r--tests/spirv/aligned-load-store.slang13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/spirv/aligned-load-store.slang b/tests/spirv/aligned-load-store.slang
new file mode 100644
index 000000000..c6b958dc2
--- /dev/null
+++ b/tests/spirv/aligned-load-store.slang
@@ -0,0 +1,13 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+
+// CHECK: OpLoad {{.*}} Aligned 8
+// CHECK: OpStore {{.*}} Aligned 16
+
+uniform float4* data;
+
+[numthreads(1,1,1)]
+void computeMain()
+{
+ var v = loadAligned<8>((float2x4*)data);
+ storeAligned<16>((float2x4*)data+1, v);
+} \ No newline at end of file