summaryrefslogtreecommitdiff
path: root/tests/metal
diff options
context:
space:
mode:
authorDarren Wihandi <65404740+fairywreath@users.noreply.github.com>2025-05-16 13:42:59 -0400
committerGitHub <noreply@github.com>2025-05-16 10:42:59 -0700
commit8683b85c0494db99feb08b6efcdc26dfe006729f (patch)
tree6822d8fabc336409b286c854617fd525bd90fcf2 /tests/metal
parent9dfd5244ad2953753535e82acd05e72e5ab2bc5f (diff)
Fix HLSL ByteAddressBuffer Load* parameter integer type (#7117)
* Fix HLSL ByteAddressBuffer Load* parameter integer type * Fix tests * Fix load with alignment function signature clash * Fix LoadAligned tests
Diffstat (limited to 'tests/metal')
-rw-r--r--tests/metal/byte-address-buffer.slang8
-rw-r--r--tests/metal/system-val-conversion.slang2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/metal/byte-address-buffer.slang b/tests/metal/byte-address-buffer.slang
index cf704f170..53c0e0ac5 100644
--- a/tests/metal/byte-address-buffer.slang
+++ b/tests/metal/byte-address-buffer.slang
@@ -19,12 +19,12 @@ struct TestStruct
[numthreads(1,1,1)]
void main_kernel(uint3 tid: SV_DispatchThreadID)
{
- // CHECK: uint [[WORD0:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(int(0))>>2]);
+ // CHECK: uint [[WORD0:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(0U)>>2]);
// CHECK: uint8_t [[A:[a-zA-Z0-9_]+]] = uint8_t(([[WORD0]] >> 0U) & 255U);
- // CHECK: uint [[WORD1:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(int(0))>>2]);
+ // CHECK: uint [[WORD1:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(0U)>>2]);
// CHECK: half [[H:[a-zA-Z0-9_]+]] = as_type<half>(ushort(([[WORD1]] >> 16U) & 65535U));
- // CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 4294967040U) | (uint([[A]]) << 0U));
- // CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 65535U) | (uint(as_type<ushort>([[H]])) << 16U));
+ // CHECK: {{.*}}[(128U)>>2] = as_type<uint32_t>(({{.*}} & 4294967040U) | (uint([[A]]) << 0U));
+ // CHECK: {{.*}}[(128U)>>2] = as_type<uint32_t>(({{.*}} & 65535U) | (uint(as_type<ushort>([[H]])) << 16U));
buffer.Store(128, buffer.Load<TestStruct>(0));
}
diff --git a/tests/metal/system-val-conversion.slang b/tests/metal/system-val-conversion.slang
index 5a208086d..dd8e103ae 100644
--- a/tests/metal/system-val-conversion.slang
+++ b/tests/metal/system-val-conversion.slang
@@ -20,7 +20,7 @@ struct TestStruct
}
// CHECK: void main_kernel(uint3 tid{{.*}}
-// CHECK: int tid{{.*}} = int(tid{{.*}}.x);
+// CHECK: uint(int(tid{{.*}}.x))
[numthreads(1,1,1)]
void main_kernel(int tid: SV_DispatchThreadID)