Skip to content

Commit

Permalink
[WGSL] Add metal tests to array functions
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267225
rdar://120645966

Reviewed by Mike Wyrzykowski.

Run the arrayLength test (the only function in the built-in array functions section)
through the metal compiler.

* Source/WebGPU/WGSL/tests/valid/overload.wgsl:

Canonical link: https://commits.webkit.org/272811@main
  • Loading branch information
tadeuzagallo committed Jan 9, 2024
1 parent aceedf8 commit ce2650e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/WebGPU/WGSL/tests/valid/overload.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -1647,10 +1647,12 @@ fn testSelect()

// 16.4. Array Built-in Functions

var<storage, read> a1: array<i32>;
var<storage, read_write> a2: array<i32>;
@group(4) @binding(0) var<storage, read> a1: array<i32>;
@group(4) @binding(1) var<storage, read_write> a2: array<i32>;

// 16.4.1.
// RUN: %metal-compile testArrayLength
@compute @workgroup_size(1)
fn testArrayLength()
{
// [T].(Ptr[Storage, Array[T], Read]) => U32,
Expand Down

0 comments on commit ce2650e

Please sign in to comment.