summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts')
-rw-r--r--dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts
index 0cd9cafdb9..94df913d5c 100644
--- a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts
+++ b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dpdy.spec.ts
@@ -9,14 +9,22 @@ The result is the same as either dpdyFine(e) or dpdyCoarse(e).
import { makeTestGroup } from '../../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../../gpu_test.js';
-import { allInputSources } from '../../expression.js';
+
+import { d } from './derivatives.cache.js';
+import { runDerivativeTest } from './derivatives.js';
export const g = makeTestGroup(GPUTest);
+const builtin = 'dpdy';
+
g.test('f32')
.specURL('https://www.w3.org/TR/WGSL/#derivative-builtin-functions')
- .desc(`f32 tests`)
.params(u =>
- u.combine('inputSource', allInputSources).combine('vectorize', [undefined, 2, 3, 4] as const)
+ u
+ .combine('vectorize', [undefined, 2, 3, 4] as const)
+ .combine('non_uniform_discard', [false, true])
)
- .unimplemented();
+ .fn(async t => {
+ const cases = await d.get('scalar');
+ runDerivativeTest(t, cases, builtin, t.params.non_uniform_discard, t.params.vectorize);
+ });