Add arrayLength() intrinsic that accepts a pointer argument

The old non-pointer argument overload remains, but is now deprecated.

Bug: tint:806
Change-Id: Ic917ccec0f162414ce1b03df49e332ad84d8060f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54061
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-06-10 18:43:04 +00:00
committed by Tint LUCI CQ
parent 0aa7edbbd5
commit aba42ed362
46 changed files with 2298 additions and 1215 deletions

View File

@@ -792,8 +792,9 @@ TEST_F(ResolverIntrinsicDataTest, ArrayLength_Error_ArraySized) {
EXPECT_EQ(r()->error(),
"error: no matching call to arrayLength(array<i32, 4>)\n\n"
"1 candidate function:\n"
" arrayLength(array<T>) -> u32\n");
"2 candidate functions:\n"
" arrayLength(array<T>) -> u32\n"
" arrayLength(ptr<array<T>>) -> u32\n");
}
TEST_F(ResolverIntrinsicDataTest, Normalize_Vector) {