summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts')
-rw-r--r--dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts34
1 files changed, 7 insertions, 27 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts
index 849c11611f..9b240fdee9 100644
--- a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts
+++ b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.spec.ts
@@ -1,37 +1,17 @@
export const description = `
-Execution Tests for matrix AbstractFloat subtraction expression
+Execution Tests for matrix abstract-float subtraction expression
`;
import { makeTestGroup } from '../../../../../common/framework/test_group.js';
import { GPUTest } from '../../../../gpu_test.js';
-import { TypeAbstractFloat, TypeMat } from '../../../../util/conversion.js';
-import { FP } from '../../../../util/floating_point.js';
-import { sparseMatrixF64Range } from '../../../../util/math.js';
-import { makeCaseCache } from '../case_cache.js';
+import { Type } from '../../../../util/conversion.js';
import { onlyConstInputSource, run } from '../expression.js';
-import { abstractBinary } from './binary.js';
+import { d } from './af_matrix_subtraction.cache.js';
+import { abstractFloatBinary } from './binary.js';
export const g = makeTestGroup(GPUTest);
-// Cases: matCxR
-const mat_cases = ([2, 3, 4] as const)
- .flatMap(cols =>
- ([2, 3, 4] as const).map(rows => ({
- [`mat${cols}x${rows}`]: () => {
- return FP.abstract.generateMatrixPairToMatrixCases(
- sparseMatrixF64Range(cols, rows),
- sparseMatrixF64Range(cols, rows),
- 'finite',
- FP.abstract.subtractionMatrixMatrixInterval
- );
- },
- }))
- )
- .reduce((a, b) => ({ ...a, ...b }), {});
-
-export const d = makeCaseCache('binary/af_matrix_subtraction', mat_cases);
-
g.test('matrix')
.specURL('https://www.w3.org/TR/WGSL/#floating-point-evaluation')
.desc(
@@ -52,9 +32,9 @@ Accuracy: Correctly rounded
const cases = await d.get(`mat${cols}x${rows}`);
await run(
t,
- abstractBinary('-'),
- [TypeMat(cols, rows, TypeAbstractFloat), TypeMat(cols, rows, TypeAbstractFloat)],
- TypeMat(cols, rows, TypeAbstractFloat),
+ abstractFloatBinary('-'),
+ [Type.mat(cols, rows, Type.abstractFloat), Type.mat(cols, rows, Type.abstractFloat)],
+ Type.mat(cols, rows, Type.abstractFloat),
t.params,
cases
);