summaryrefslogtreecommitdiff
path: root/tests/metal/vector-argument-buffer-layout.slang
diff options
context:
space:
mode:
authorJames Helferty (NVIDIA) <jhelferty@nvidia.com>2025-09-30 14:21:27 -0400
committerGitHub <noreply@github.com>2025-09-30 18:21:27 +0000
commit8086adc90b69f3199767c0617e2c429ce6b27f67 (patch)
treecbc54d5dbb3ad13329abc49f3aabf25ee199b7d6 /tests/metal/vector-argument-buffer-layout.slang
parentee5adb87050ae7c0b96056a67dddc5d48174e695 (diff)
Enable metal tests (#8446)
Enables all tests/metal/ tests that can be easily enabled. These tests were not originally designed as render tests; they are generally being enabled for pipecleaning purposes, and will not be rigorously testing the corresponding funcitonality. Where they cannot be enabled as render tests, and a metallib test wasn't already enabled, a metallib test was enabled instead (where possible). Fixes #7892
Diffstat (limited to 'tests/metal/vector-argument-buffer-layout.slang')
-rw-r--r--tests/metal/vector-argument-buffer-layout.slang23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/metal/vector-argument-buffer-layout.slang b/tests/metal/vector-argument-buffer-layout.slang
index 5e45e3a01..dcc89be7c 100644
--- a/tests/metal/vector-argument-buffer-layout.slang
+++ b/tests/metal/vector-argument-buffer-layout.slang
@@ -1,17 +1,19 @@
-//TEST:REFLECTION(filecheck=CHECK): -target metal
+//TEST:REFLECTION(filecheck=METAL): -target metal
+//TEST(compute, metal):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -output-using-type
+//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -output-using-type
-//CHECK: "name": "o",
-//CHECK: "binding": {"kind": "constantBuffer", "index": 0},
+//METAL: "name": "o",
+//METAL: "binding": {"kind": "constantBuffer", "index": 0},
-//CHECK: "name": "gParams",
-//CHECK: "binding": {"kind": "constantBuffer", "index": 1},
+//METAL: "name": "gParams",
+//METAL: "binding": {"kind": "constantBuffer", "index": 1},
-//CHECK: "dir"
-//CHECK: "binding": {"kind": "uniform", "offset": 0, "size": 16, "elementStride": 4}
-//CHECK: "color"
-//CHECK: "binding": {"kind": "uniform", "offset": 16, "size": 16, "elementStride": 4}
+//METAL: "dir"
+//METAL: "binding": {"kind": "uniform", "offset": 0, "size": 16, "elementStride": 4}
+//METAL: "color"
+//METAL: "binding": {"kind": "uniform", "offset": 16, "size": 16, "elementStride": 4}
struct Params
{
@@ -19,11 +21,14 @@ struct Params
float4 color;
}
+//TEST_INPUT: ubuffer(data=[0.0], stride=4):out,name o
RWStructuredBuffer<float> o;
+//TEST_INPUT: set gParams = new Params{{3.0, 4.0, 5.0}, {6.0, 7.0 ,8.0, 9.0}}
ParameterBlock<Params> gParams;
[numthreads(1,1,1)]
void computeMain()
{
+ // BUF: 3.0
o[0] = gParams.dir.x;
}