summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/atomicOr.spec.ts
blob: 0b8f6cdc417b312691c23ba91fdedb13ba4c9861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export const description = `
Atomically read, or and store value.

 * Load the original value pointed to by atomic_ptr.
 * Obtains a new value by or'ing with the value v.
 * Store the new value using atomic_ptr.

Returns the original value stored in the atomic object.
`;

import { makeTestGroup } from '../../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../../gpu_test.js';

export const g = makeTestGroup(GPUTest);

g.test('stage')
  .specURL('https://www.w3.org/TR/WGSL/#atomic-rmw')
  .desc(
    `
Atomic built-in functions must not be used in a vertex shader stage.
`
  )
  .params(u => u.combine('stage', ['fragment', 'vertex', 'compute'] as const))
  .unimplemented();

g.test('or')
  .specURL('https://www.w3.org/TR/WGSL/#atomic-rmw')
  .desc(
    `
SC is storage or workgroup
T is i32 or u32

fn atomicOr(atomic_ptr: ptr<SC, atomic<T>, read_write>, v: T) -> T
`
  )
  .params(u =>
    u.combine('SC', ['storage', 'uniform'] as const).combine('T', ['i32', 'u32'] as const)
  )
  .unimplemented();